forked from 1b-agent/opencadstudio-upstream
fix(polyline): correct 3D smoothing
This commit is contained in:
commit
50e5dcaaac
36 files changed
+4100
-1130
No files matched your search
+71
-1
@@ -763,6 +763,12 @@ impl PropertiesPanel {
|
||||
PropValue::ColorVaries => self.render_color_varies_row(label),
|
||||
PropValue::LayerChoice(layer) => self.render_layer_row(label, layer),
|
||||
PropValue::LwChoice(lw) => self.render_lw_row(label, *lw),
|
||||
PropValue::FieldLwChoice { field, value } => {
|
||||
self.render_field_lw_row(label, field, *value)
|
||||
}
|
||||
PropValue::FieldLwVaries { field } => {
|
||||
self.render_field_lw_varies_row(label, field)
|
||||
}
|
||||
PropValue::LwVaries => self.render_lw_varies_row(label),
|
||||
PropValue::LinetypeChoice(lt) => self.render_linetype_row(label, lt),
|
||||
PropValue::Choice { selected, options } => {
|
||||
@@ -861,6 +867,10 @@ impl PropertiesPanel {
|
||||
| "dim_ext_line_color"
|
||||
| "dim_text_color"
|
||||
| "dim_text_fill_color"
|
||||
| "line_color"
|
||||
| "text_color"
|
||||
| "block_content_color"
|
||||
| "background_fill_color"
|
||||
) {
|
||||
let open = self.open_color_field.as_deref() == Some(field);
|
||||
let fsel = field.to_string();
|
||||
@@ -871,7 +881,9 @@ impl PropertiesPanel {
|
||||
background: true,
|
||||
..Default::default()
|
||||
}
|
||||
} else if field.starts_with("dim_") {
|
||||
} else if field.starts_with("dim_")
|
||||
|| matches!(field, "line_color" | "text_color" | "block_content_color")
|
||||
{
|
||||
crate::ui::color_select::ColorExtras {
|
||||
by_layer: true,
|
||||
by_block: true,
|
||||
@@ -998,6 +1010,36 @@ impl PropertiesPanel {
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
fn render_field_lw_row<'a>(
|
||||
&'a self,
|
||||
label: &'a str,
|
||||
field: &'static str,
|
||||
lw: LineWeight,
|
||||
) -> Element<'a, Message> {
|
||||
let selected = LwItem(lw);
|
||||
let combo = combo_box(
|
||||
&self.lineweight_combo,
|
||||
"",
|
||||
Some(&selected),
|
||||
move |item: LwItem| Message::PropFieldLwChanged {
|
||||
field,
|
||||
value: item.0,
|
||||
},
|
||||
)
|
||||
.size(FONT_SZ)
|
||||
.padding(Padding {
|
||||
top: COMBO_PAD_V,
|
||||
bottom: COMBO_PAD_V,
|
||||
left: 6.0,
|
||||
right: 6.0,
|
||||
})
|
||||
.input_style(combo_input_style)
|
||||
.on_open(Message::PropColorPickerClose)
|
||||
.width(Length::Fill);
|
||||
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
fn render_lw_varies_row<'a>(&'a self, label: &'a str) -> Element<'a, Message> {
|
||||
let combo = combo_box(
|
||||
&self.lineweight_combo,
|
||||
@@ -1019,6 +1061,34 @@ impl PropertiesPanel {
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
fn render_field_lw_varies_row<'a>(
|
||||
&'a self,
|
||||
label: &'a str,
|
||||
field: &'static str,
|
||||
) -> Element<'a, Message> {
|
||||
let combo = combo_box(
|
||||
&self.lineweight_combo,
|
||||
VARIES_LABEL,
|
||||
None,
|
||||
move |item: LwItem| Message::PropFieldLwChanged {
|
||||
field,
|
||||
value: item.0,
|
||||
},
|
||||
)
|
||||
.size(FONT_SZ)
|
||||
.padding(Padding {
|
||||
top: COMBO_PAD_V,
|
||||
bottom: COMBO_PAD_V,
|
||||
left: 6.0,
|
||||
right: 6.0,
|
||||
})
|
||||
.input_style(combo_input_style)
|
||||
.on_open(Message::PropColorPickerClose)
|
||||
.width(Length::Fill);
|
||||
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
// ── Linetype row (combo_box) ──────────────────────────────────────────
|
||||
|
||||
fn render_linetype_row<'a>(&'a self, label: &'a str, current: &'a str) -> Element<'a, Message> {
|
||||
|
||||
Reference in new issue
Block a user