fix(styles): keep style-editor scrollbar at the window's right edge
The detail-panel scrollables defaulted to shrink-to-content width, so their vertical scrollbar landed in the middle of the panel next to the content instead of at the window edge. Make the scrollables fill width (and drop the dimstyle panel's right padding so the bar sits flush) in the Dimension, Table and MLeader style editors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
bd120ca307
commit
578b8c5d64
3 changed files with 9 additions and 2 deletions
|
|
@ -622,12 +622,17 @@ pub fn view_window<'a>(
|
||||||
};
|
};
|
||||||
|
|
||||||
// ── Right panel: tabs + scrollable content ────────────────────────────
|
// ── Right panel: tabs + scrollable content ────────────────────────────
|
||||||
|
// The scrollable itself fills the full width so its scrollbar sits flush
|
||||||
|
// against the window's right edge; horizontal insets live on the inner
|
||||||
|
// content container instead of the panel padding.
|
||||||
let right_panel = container(
|
let right_panel = container(
|
||||||
column![
|
column![
|
||||||
text(format!("Editing: {selected}")).size(11).color(DIM),
|
text(format!("Editing: {selected}")).size(11).color(DIM),
|
||||||
tabs,
|
tabs,
|
||||||
hdivider(),
|
hdivider(),
|
||||||
scrollable(container(tab_content).padding([12, 12])).height(Fill),
|
scrollable(container(tab_content).padding([12, 12]).width(Fill))
|
||||||
|
.width(Fill)
|
||||||
|
.height(Fill),
|
||||||
]
|
]
|
||||||
.spacing(6)
|
.spacing(6)
|
||||||
.height(Fill),
|
.height(Fill),
|
||||||
|
|
@ -636,7 +641,7 @@ pub fn view_window<'a>(
|
||||||
.width(Fill)
|
.width(Fill)
|
||||||
.padding(iced::Padding {
|
.padding(iced::Padding {
|
||||||
top: 12.0,
|
top: 12.0,
|
||||||
right: 12.0,
|
right: 0.0,
|
||||||
bottom: 12.0,
|
bottom: 12.0,
|
||||||
left: 0.0,
|
left: 0.0,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,7 @@ pub fn view_window<'a>(v: MLeaderStyleView<'a>) -> Element<'a, Message> {
|
||||||
.spacing(6)
|
.spacing(6)
|
||||||
.padding([12, 12]),
|
.padding([12, 12]),
|
||||||
)
|
)
|
||||||
|
.width(Fill)
|
||||||
.height(Fill)
|
.height(Fill)
|
||||||
.into()
|
.into()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,7 @@ pub fn view_window<'a>(
|
||||||
.spacing(6)
|
.spacing(6)
|
||||||
.padding([12, 12]),
|
.padding([12, 12]),
|
||||||
)
|
)
|
||||||
|
.width(Fill)
|
||||||
.height(Fill)
|
.height(Fill)
|
||||||
.into()
|
.into()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue