Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Widgets/MultitaskingView/Tooltip.vala
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
* Clutter actor to display text in a tooltip-like component.
*/
public class Gala.Tooltip : Clutter.Actor {
/**
* Actor to display the Tooltip text.
*/
public float monitor_scale {
set {
rounded_corners_effect.monitor_scale = value;
}
}

private Gala.Text text_actor;
private RoundedCornersEffect rounded_corners_effect;

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

add_effect (new RoundedCornersEffect (3, 1.0f));
rounded_corners_effect = new RoundedCornersEffect (3, 1.0f);
add_effect (rounded_corners_effect);
}

public void set_text (string new_text) {
Expand Down
1 change: 1 addition & 0 deletions src/Widgets/MultitaskingView/WindowClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
};

window_title = new Tooltip ();
bind_property ("monitor-scale", window_title, "monitor-scale", SYNC_CREATE);

add_child (active_shape);
add_child (clone_container);
Expand Down