aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/layout/focus_ring.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/layout/focus_ring.rs b/src/layout/focus_ring.rs
index ed3bd028..cc0771a5 100644
--- a/src/layout/focus_ring.rs
+++ b/src/layout/focus_ring.rs
@@ -20,6 +20,7 @@ pub struct FocusRing {
is_border: bool,
use_border_shader: bool,
config: niri_config::FocusRing,
+ thicken_corners: bool,
}
niri_render_elements! {
@@ -40,6 +41,7 @@ impl FocusRing {
is_border: false,
use_border_shader: false,
config,
+ thicken_corners: true,
}
}
@@ -104,7 +106,8 @@ impl FocusRing {
let rounded_corner_border_width = if self.is_border {
// HACK: increase the border width used for the inner rounded corners a tiny bit to
// reduce background bleed.
- width as f32 + 0.5
+ let extra = if self.thicken_corners { 0.5 } else { 0. };
+ width as f32 + extra
} else {
0.
};
@@ -268,6 +271,10 @@ impl FocusRing {
self.config.off
}
+ pub fn set_thicken_corners(&mut self, value: bool) {
+ self.thicken_corners = value;
+ }
+
pub fn config(&self) -> &niri_config::FocusRing {
&self.config
}