Fix issues found while integrating contributor PRs

This commit is contained in:
Hakan Seven committed 2026-09-08 12:14:28 +03:00
1 parent 6a2782f891
commit 5b663bfe38
5 files changed
+52 -48

No files matched your search

+3 -12
View File
@@ -8,14 +8,9 @@ use crate::ui::properties::acad_color_display;
use crate::ui::ROW_H;
use acadrust::types::Color as AcadColor;
use iced::widget::{button, column, container, row, text};
use iced::{Background, Border, Color, Element, Length, Padding, Theme};
use iced::{Background, Border, Color, Element, Length, Theme};
use crate::t;
/// Font size for color selector buttons (matches combo_box styling).
const FONT_SZ: f32 = ROW_H * 0.42;
/// Vertical padding for color selector buttons (matches combo_box styling).
const SELECTOR_PAD_V: f32 = (ROW_H - FONT_SZ * 1.3 - 2.0) / 2.0;
/// Which "logical" entries the colour list offers besides the standard ACI
/// colours.
#[derive(Clone, Copy, Default)]
@@ -228,12 +223,8 @@ fn color_selector_with_indicator<'a>(
.align_y(iced::Center),
)
.on_press(on_toggle)
.padding(Padding {
top: SELECTOR_PAD_V,
bottom: SELECTOR_PAD_V,
left: 6.0,
right: 6.0,
})
.padding([3, 6])
.height(ROW_H)
.width(Length::Fill);
if !open {
+3 -4
View File
@@ -128,14 +128,13 @@ fn measure_large_width(renderer: &iced::Renderer, label: &str) -> f32 {
.0;
let max_label_height = line_height * LARGE_LABEL_LINES + 0.5;
let fits = |width: f32| {
ribbon_label_bounds(
let bounds = ribbon_label_bounds(
renderer,
label,
width,
advanced_text::Wrapping::Word,
)
.height
<= max_label_height
);
bounds.width <= width + 0.5 && bounds.height <= max_label_height
};
if fits(base_inner) {