Preserve title space in document tab wrapper

This commit is contained in:
Dylan M. Taylor
2026-11-21 13:37:13 -05:00
parent d86394cd5d
commit 4afe53cae8
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -147,13 +147,8 @@ fn a_document_tab_strip_in_the_bar_takes_the_free_width() {
Title::new("One.pdf"),
|ui, _| {
Button::new("Home").show(ui);
DocumentTabs::new("Documents", &tabs)
.reorderable(true)
.selected(0)
.trailing(|ui| {
Button::new("Open").show(ui);
})
.show(ui);
DocumentTabs::new("Documents", &tabs).reorderable(true).selected(0).show(ui);
Button::new("Open").show(ui);
},
|ui, _| {
Button::new("Settings").show(ui);
+1 -1
View File
@@ -332,7 +332,7 @@ impl<'a, D: Clone + Eq + Hash + Send + Sync + std::fmt::Debug + 'static> Documen
let mut shown = None;
// The row measures more than once to reserve non-filling children before sharing the
// remaining width. Recreate the strip and show both areas on every sweep.
let row = Row::new().fill_width().show(ui, |ui, _| {
let row = Row::new().show(ui, |ui, _| {
if let Some(area) = leading.as_mut() {
area(ui);
}