Skip to content

Commit 3190129

Browse files
committed
Fix negative tooltip width
1 parent 98d7c26 commit 3190129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Widgets/WindowClone.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ public class Gala.WindowClone : Clutter.Actor {
485485
float window_title_height, window_title_nat_width;
486486
window_title.get_preferred_size (null, null, out window_title_nat_width, out window_title_height);
487487

488-
var window_title_width = float.min (window_title_nat_width, window_title_max_width);
488+
var window_title_width = window_title_nat_width.clamp (0, window_title_max_width);
489489

490490
float window_title_x = (box.get_width () - window_title_width) / 2;
491491
float window_title_y = box.get_height () - InternalUtils.scale_to_int (WINDOW_ICON_SIZE, monitor_scale) * 0.75f - (window_title_height / 2) - InternalUtils.scale_to_int (18, monitor_scale);

0 commit comments

Comments
 (0)