diff options
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/monitor.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index 8f322e9e..211b5249 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -1152,11 +1152,15 @@ impl<W: LayoutElement> Monitor<W> { let hint_height = gap - hint_gap * 2.; let next_ws_geo = self.workspaces_render_geo().nth(ws_idx).unwrap(); - let hint_loc_diff = Point::from((0., hint_height + hint_gap)); + let hint_width = round_logical_in_physical(scale, next_ws_geo.size.w * 0.75); + let hint_x = + round_logical_in_physical(scale, (next_ws_geo.size.w - hint_width) / 2.); + + let hint_loc_diff = Point::from((-hint_x, hint_height + hint_gap)); let hint_loc = next_ws_geo.loc - hint_loc_diff; - let hint_size = Size::from((next_ws_geo.size.w, hint_height)); + let hint_size = Size::from((hint_width, hint_height)); - // FIXME: sometimes the hint ends up 1 px wider than necessary and/or 1 px + // Sometimes the hint ends up 1 px wider than necessary and/or 1 px // narrower than necessary. The values here seem correct. Might have to do with // how zooming out currently doesn't round to output scale properly. |
