fix(ribbon): preserve forced panel levels
This commit is contained in:
parent
af2f5f691b
commit
a64a7f7889
1 changed files with 5 additions and 1 deletions
|
|
@ -285,7 +285,11 @@ impl<'a> Widget<Message, Theme, Renderer> for CollapsePanels<'a> {
|
||||||
heights.push([f.height, c.height, b.height, t.height]);
|
heights.push([f.height, c.height, b.height, t.height]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let levels = decide_levels(self.mode, &widths, max_w);
|
let levels = if let Some(level) = self.mode.forced_level() {
|
||||||
|
vec![level; n]
|
||||||
|
} else {
|
||||||
|
decide_levels(self.mode, &widths, max_w)
|
||||||
|
};
|
||||||
|
|
||||||
// The row is "tight" once any panel has dropped to its small icon — the
|
// The row is "tight" once any panel has dropped to its small icon — the
|
||||||
// last, most cramped state. The tab bar hides its mode selector then.
|
// last, most cramped state. The tab bar hides its mode selector then.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue