Skip to content

Commit

Permalink
design: use active_window_hint as the thickness for floating window s…
Browse files Browse the repository at this point in the history
…nap outline

This commit changes the snapping indicator's thickness to match the active window hint, per design recommendation by Maria. The thickness for this outline never goes under 1, also per Maria's spec.

Signed-off-by: Ryan Brue <[email protected]>
  • Loading branch information
ryanabx authored and Drakulix committed Nov 6, 2024
1 parent 90883c6 commit 641bb75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shell/grabs/moving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ impl MoveGrabState {
};

let gaps = (theme.gaps.0 as i32, theme.gaps.1 as i32);
let thickness = self.indicator_thickness.max(1);

let snapping_indicator = match &self.snapping_zone {
Some(t) if &self.cursor_output == output => {
Expand All @@ -155,7 +156,7 @@ impl MoveGrabState {
renderer,
Key::Window(Usage::SnappingIndicator, self.window.key()),
overlay_geometry,
3,
thickness,
theme.radius_s()[0] as u8, // TODO: Fix once shaders support 4 corner radii customization
1.0,
output_scale.x,
Expand Down

0 comments on commit 641bb75

Please sign in to comment.