forked from 1b-agent/opencadstudio-upstream
Select Color: 40 px mode buttons with larger labels, frameless pipette
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rGmDUNr1hUf4zo1X3dak8
This commit is contained in:
2 files changed
+7
-7
No files matched your search
@@ -19,7 +19,7 @@ const STRIP_WIDTH: f32 = 22.0;
|
|||||||
/// at the same height in every mode: 3 × 26 + 2 × 14 + 12 = 108 + 10.
|
/// at the same height in every mode: 3 × 26 + 2 × 14 + 12 = 108 + 10.
|
||||||
const ROW_GAP: f32 = 14.0;
|
const ROW_GAP: f32 = 14.0;
|
||||||
const FIELD_HEIGHT: f32 = 108.0;
|
const FIELD_HEIGHT: f32 = 108.0;
|
||||||
const MODE_WIDTH: f32 = 44.0;
|
const MODE_WIDTH: f32 = 40.0;
|
||||||
const MODE_HEIGHT: f32 = 24.0;
|
const MODE_HEIGHT: f32 = 24.0;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
||||||
@@ -187,8 +187,8 @@ impl ColorEditor {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let mut modes = row![
|
let mut modes = row![
|
||||||
mode_button(text("HSB").size(11).into(), EditorMode::Hsb),
|
mode_button(text("HSB").size(13).into(), EditorMode::Hsb),
|
||||||
mode_button(text("RGB").size(11).into(), EditorMode::Rgb),
|
mode_button(text("RGB").size(13).into(), EditorMode::Rgb),
|
||||||
field_button,
|
field_button,
|
||||||
Space::new().width(Length::Fill),
|
Space::new().width(Length::Fill),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -397,11 +397,11 @@ impl ColorPicker {
|
|||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(
|
Some(
|
||||||
button(crate::ui::icons::themed(crate::ui::icons::EYEDROPPER, 14.0))
|
// Just the icon, without a button frame.
|
||||||
|
button(crate::ui::icons::themed(crate::ui::icons::EYEDROPPER, 24.0))
|
||||||
.on_press(picker_msg(ColorPickerMsg::Eyedropper(EyedropperMsg::Start)))
|
.on_press(picker_msg(ColorPickerMsg::Eyedropper(EyedropperMsg::Start)))
|
||||||
.height(24)
|
.padding(0)
|
||||||
.padding([0, 7])
|
.style(|_theme: &Theme, _status| button::Style::default())
|
||||||
.style(|theme: &Theme, status| toggle_style(theme, false, status))
|
|
||||||
.into(),
|
.into(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user