Skip to content

Commit 99a700a

Browse files
authored
Merge branch 'main' into lenemter/fix-active-shape
2 parents 1fcdfd5 + 3458e11 commit 99a700a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/Widgets/MultitaskingView/Tooltip.vala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
* Clutter actor to display text in a tooltip-like component.
99
*/
1010
public class Gala.Tooltip : Clutter.Actor {
11-
/**
12-
* Actor to display the Tooltip text.
13-
*/
11+
public float monitor_scale { get; construct set; }
12+
1413
private Gala.Text text_actor;
1514

15+
public Tooltip (float monitor_scale) {
16+
Object (monitor_scale: monitor_scale);
17+
}
18+
1619
construct {
1720
text_actor = new Gala.Text () {
1821
margin_left = 6,
@@ -28,7 +31,9 @@ public class Gala.Tooltip : Clutter.Actor {
2831
layout_manager = new Clutter.BinLayout ();
2932
background_color = Drawing.Color.TOOLTIP_BACKGROUND;
3033

31-
add_effect (new RoundedCornersEffect (3, 1.0f));
34+
var rounded_corners_effect = new RoundedCornersEffect (3, monitor_scale);
35+
bind_property ("monitor-scale", rounded_corners_effect, "monitor-scale");
36+
add_effect (rounded_corners_effect);
3237
}
3338

3439
public void set_text (string new_text) {

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
134134
pivot_point = { 0.5f, 0.5f }
135135
};
136136

137-
window_title = new Tooltip ();
137+
window_title = new Tooltip (monitor_scale);
138+
bind_property ("monitor-scale", window_title, "monitor-scale");
138139

139140
close_button = new Gala.CloseButton (monitor_scale) {
140141
opacity = 0

0 commit comments

Comments
 (0)