forked from 1b-agent/opencadstudio-upstream
Merge pull request #1067 from UserDevtec/fix/align-bylayer-dropdowns
This commit is contained in:
commit
5dcf2bde0b
1 file changed
+13
-2
+13
-2
@@ -5,11 +5,17 @@
|
||||
|
||||
use crate::app::Message;
|
||||
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, Theme};
|
||||
use iced::{Background, Border, Color, Element, Length, Padding, 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)]
|
||||
@@ -222,7 +228,12 @@ fn color_selector_with_indicator<'a>(
|
||||
.align_y(iced::Center),
|
||||
)
|
||||
.on_press(on_toggle)
|
||||
.padding([3, 6])
|
||||
.padding(Padding {
|
||||
top: SELECTOR_PAD_V,
|
||||
bottom: SELECTOR_PAD_V,
|
||||
left: 6.0,
|
||||
right: 6.0,
|
||||
})
|
||||
.width(Length::Fill);
|
||||
|
||||
if !open {
|
||||
|
||||
Reference in new issue
Block a user