Skip to content

Commit 8d8554a

Browse files
committed
Scale tooltip corner radius
1 parent 3f04c37 commit 8d8554a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Widgets/MultitaskingView/Tooltip.vala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +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 {
12+
set {
13+
rounded_corners_effect.monitor_scale = value;
14+
}
15+
}
16+
1417
private Gala.Text text_actor;
18+
private RoundedCornersEffect rounded_corners_effect;
1519

1620
construct {
1721
#if HAS_MUTTER47
@@ -44,7 +48,8 @@ public class Gala.Tooltip : Clutter.Actor {
4448
(uint8) (Drawing.Color.TOOLTIP_BACKGROUND.alpha * uint8.MAX)
4549
};
4650

47-
add_effect (new RoundedCornersEffect (3, 1.0f));
51+
rounded_corners_effect = new RoundedCornersEffect (3, 1.0f);
52+
add_effect (rounded_corners_effect);
4853
}
4954

5055
public void set_text (string new_text) {

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
135135
};
136136

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

139140
add_child (active_shape);
140141
add_child (clone_container);

0 commit comments

Comments
 (0)