forked from 1b-agent/opencadstudio-upstream
Fix ribbon command labels wrapping in the middle of words
Replace Wrapping::WordOrGlyph with Wrapping::Word to prevent labels like 'Dimensions' from breaking as 'Dimensio' + 'ns'. Word-only wrapping ensures labels only wrap at word boundaries. Fixes #1046 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
febedad916
commit
8497abecfd
1 file changed
+3
-3
@@ -132,7 +132,7 @@ fn measure_large_width(renderer: &iced::Renderer, label: &str) -> f32 {
|
|||||||
renderer,
|
renderer,
|
||||||
label,
|
label,
|
||||||
width,
|
width,
|
||||||
advanced_text::Wrapping::WordOrGlyph,
|
advanced_text::Wrapping::Word,
|
||||||
)
|
)
|
||||||
.height
|
.height
|
||||||
<= max_label_height
|
<= max_label_height
|
||||||
@@ -685,7 +685,7 @@ pub(super) fn render_large_dropdown<'a>(
|
|||||||
.size(10)
|
.size(10)
|
||||||
.width(Fill)
|
.width(Fill)
|
||||||
.align_x(iced::Center)
|
.align_x(iced::Center)
|
||||||
.wrapping(advanced_text::Wrapping::WordOrGlyph),
|
.wrapping(advanced_text::Wrapping::Word),
|
||||||
]
|
]
|
||||||
.align_x(iced::Center)
|
.align_x(iced::Center)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
@@ -818,7 +818,7 @@ pub(super) fn render_large<'a>(
|
|||||||
.size(10)
|
.size(10)
|
||||||
.width(Fill)
|
.width(Fill)
|
||||||
.align_x(iced::Center)
|
.align_x(iced::Center)
|
||||||
.wrapping(advanced_text::Wrapping::WordOrGlyph),
|
.wrapping(advanced_text::Wrapping::Word),
|
||||||
]
|
]
|
||||||
.align_x(iced::Center)
|
.align_x(iced::Center)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
|
|||||||
Reference in new issue
Block a user