From 16ca9ffa6e97c9b62ff0b1efee3a5f97344805f4 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 4 Feb 2025 21:21:01 +0300 Subject: [PATCH] Allow negative gap for tab indicators Also gate on render_above_top_layer(), since otherwise tab indicators with a negative gap will render on top of the fullscreen window. --- niri-config/src/lib.rs | 2 +- src/layout/scrolling.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 17cc75faa..0681daefa 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -679,7 +679,7 @@ pub struct TabIndicator { #[knuffel(child)] pub off: bool, #[knuffel(child, unwrap(argument), default = Self::default().gap)] - pub gap: FloatOrInt<0, 65535>, + pub gap: FloatOrInt<-65535, 65535>, #[knuffel(child, unwrap(argument), default = Self::default().width)] pub width: FloatOrInt<0, 65535>, #[knuffel(child, default = Self::default().length)] diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index e27317836..26d375c9e 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -2467,7 +2467,7 @@ impl ScrollingSpace { let col_render_off = col.render_offset(); // Draw the tab indicator on top. - { + if !self.render_above_top_layer() { // This is the "static tile position" so to say: it excludes the tile offset (used // for e.g. centering smaller tiles in always-center) and the tile render offset // (used for tile-specific animations).