feat(ribbon): the layer combo shows typical layer names in full

The closed combo is at least 250 px wide (about 25 characters of name)
and its dropdown 300 px.

Fixes #1648

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-08 08:34:49 +03:00
1 parent da2704bb45
commit 6256ad3bd5
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -1129,9 +1129,9 @@ impl Ribbon {
.spacing(2),
)
.style(popup_panel_style)
.width(Length::Fixed(220.0));
.width(Length::Fixed(300.0));
let (align_right, h_pad, top) = self.dd_anchor(LAYER_COMBO_ID, 220.0, win.0);
let (align_right, h_pad, top) = self.dd_anchor(LAYER_COMBO_ID, 300.0, win.0);
let positioned = position_ribbon_dropdown(panel.into(), align_right, h_pad, top);
Some(dropdown_backdrop(positioned))
+3 -1
View File
@@ -996,7 +996,9 @@ pub(super) fn render_large<'a>(
let tools_w = tool_count * TOOL_BUTTON_W
+ (tool_count - 1.0).max(0.0) * TOOL_SPACING
+ GROUP_PADDING;
let combo_w = (LARGE_W * 2.5).max(tools_w);
// Wide enough to read a typical layer name (about 25 characters)
// in the closed combo.
let combo_w = (LARGE_W * 2.5).max(tools_w).max(250.0);
let info = layer_infos.iter().find(|l| l.name == active_layer);
let lc = info.map(|l| l.color).unwrap_or(Color::WHITE);