Skip to content

Commit

Permalink
Allow negative gap for tab indicators
Browse files Browse the repository at this point in the history
Also gate on render_above_top_layer(), since otherwise tab indicators with a
negative gap will render on top of the fullscreen window.
  • Loading branch information
YaLTeR committed Feb 4, 2025
1 parent b31a4b3 commit 16ca9ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion niri-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/layout/scrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,7 @@ impl<W: LayoutElement> ScrollingSpace<W> {
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).
Expand Down

0 comments on commit 16ca9ff

Please sign in to comment.