forked from 1b-agent/opencadstudio-upstream
fix(ui): float the colour-selector popup instead of pushing the form (#94)
The colour list/palette was laid out inline, shifting everything below it down when opened. Wrap it in a small custom widget (Floating) that renders the button inline and the popup as an iced overlay anchored below it, so it floats over the UI like a real dropdown. Picking a colour now also closes the popup (the style editors clear their open-field state on edit). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
96a5a32735
commit
3a87a18f32
2 files changed
+248
-16
No files matched your search
@@ -6544,6 +6544,7 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
Message::TableStyleCellEdit { row, field, value } => {
|
||||
self.ts_color_open = None;
|
||||
let r = row as usize;
|
||||
if r < 3 {
|
||||
match field {
|
||||
@@ -6950,6 +6951,7 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
Message::MLeaderStyleEdit { field, value } => {
|
||||
self.mls_color_open = None;
|
||||
match field {
|
||||
"landing_distance" => self.mls_landing_distance = value,
|
||||
"landing_gap" => self.mls_landing_gap = value,
|
||||
@@ -7304,6 +7306,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
Message::DsEdit(field, val) => {
|
||||
self.apply_ds_edit(field, val);
|
||||
self.ds_color_open = None;
|
||||
Task::none()
|
||||
}
|
||||
Message::DsToggle(field) => {
|
||||
|
||||
Reference in new issue
Block a user