Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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,11 +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 { get; construct set; }

private Gala.Text text_actor;

public Tooltip (float monitor_scale) {
Object (monitor_scale: monitor_scale);
}

construct {
text_actor = new Gala.Text () {
margin_left = 6,
Expand All @@ -28,7 +31,9 @@ public class Gala.Tooltip : Clutter.Actor {
layout_manager = new Clutter.BinLayout ();
background_color = Drawing.Color.TOOLTIP_BACKGROUND;

add_effect (new RoundedCornersEffect (3, 1.0f));
var rounded_corners_effect = new RoundedCornersEffect (3, monitor_scale);
bind_property ("monitor-scale", rounded_corners_effect, "monitor-scale");
add_effect (rounded_corners_effect);
}

public void set_text (string new_text) {
Expand Down
3 changes: 2 additions & 1 deletion src/Widgets/MultitaskingView/WindowClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
pivot_point = { 0.5f, 0.5f }
};

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

close_button = new Gala.CloseButton (monitor_scale) {
opacity = 0
Expand Down