版面修復:瀏覽器設定檔的 Firefox 說明文字用繪製字體(FONT_SM)量寬換行——之前用 CAPTION 量、SMALL 畫,行尾溢出卡片 11px 並把設定›電腦頁撐寬 37px
已驗證: cargo test 全綠(layout_audit 5 passed,含設定›電腦兩資料組)、cargo test layout_audit
This commit is contained in:
parent
7c91bd9ffc
commit
21e87ee2c6
|
|
@ -5124,7 +5124,9 @@ impl App {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if let Some(note) = note {
|
if let Some(note) = note {
|
||||||
let font = egui::FontId::proportional(FONT_XS);
|
// Measure with the font the label actually draws in (it is FONT_SM here): a
|
||||||
|
// narrower measuring font wraps too late and the line pokes past the card.
|
||||||
|
let font = egui::FontId::proportional(FONT_SM);
|
||||||
let text = wrap_to_width(&t(note), (row_w - 26.0).max(80.0), |x| ui.painter().layout_no_wrap(x.to_string(), font.clone(), egui::Color32::WHITE).size().x);
|
let text = wrap_to_width(&t(note), (row_w - 26.0).max(80.0), |x| ui.painter().layout_no_wrap(x.to_string(), font.clone(), egui::Color32::WHITE).size().x);
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
// (Under the name, past the radio button.)
|
// (Under the name, past the radio button.)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue