mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 21:18:12 +08:00
fix min value and degree unit
This commit is contained in:
@@ -1250,10 +1250,10 @@ pub(crate) fn spiral_properties(node_id: NodeId, context: &mut NodePropertiesCon
|
|||||||
if let Some(&TaggedValue::SpiralType(spiral_type)) = spiral_type_input.as_non_exposed_value() {
|
if let Some(&TaggedValue::SpiralType(spiral_type)) = spiral_type_input.as_non_exposed_value() {
|
||||||
match spiral_type {
|
match spiral_type {
|
||||||
SpiralType::Archimedean => {
|
SpiralType::Archimedean => {
|
||||||
let start_radius = LayoutGroup::Row {
|
let inner_radius = LayoutGroup::Row {
|
||||||
widgets: number_widget(
|
widgets: number_widget(
|
||||||
ParameterWidgetsInfo::from_index(document_node, node_id, InnerRadiusInput::INDEX, true, context),
|
ParameterWidgetsInfo::from_index(document_node, node_id, InnerRadiusInput::INDEX, true, context),
|
||||||
NumberInput::default().min(0.01),
|
NumberInput::default().min(0.),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1264,7 +1264,7 @@ pub(crate) fn spiral_properties(node_id: NodeId, context: &mut NodePropertiesCon
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
widgets.extend([start_radius, tightness]);
|
widgets.extend([inner_radius, tightness]);
|
||||||
}
|
}
|
||||||
SpiralType::Logarithmic => {
|
SpiralType::Logarithmic => {
|
||||||
let start_radius = LayoutGroup::Row {
|
let start_radius = LayoutGroup::Row {
|
||||||
@@ -1292,7 +1292,7 @@ pub(crate) fn spiral_properties(node_id: NodeId, context: &mut NodePropertiesCon
|
|||||||
);
|
);
|
||||||
let angle_offset = number_widget(
|
let angle_offset = number_widget(
|
||||||
ParameterWidgetsInfo::from_index(document_node, node_id, AngleOffsetInput::INDEX, true, context),
|
ParameterWidgetsInfo::from_index(document_node, node_id, AngleOffsetInput::INDEX, true, context),
|
||||||
NumberInput::default().min(0.1).max(180.).unit(" °"),
|
NumberInput::default().min(0.1).max(180.).unit("°"),
|
||||||
);
|
);
|
||||||
|
|
||||||
widgets.extend([LayoutGroup::Row { widgets: turns }, LayoutGroup::Row { widgets: angle_offset }]);
|
widgets.extend([LayoutGroup::Row { widgets: turns }, LayoutGroup::Row { widgets: angle_offset }]);
|
||||||
|
|||||||
Reference in New Issue
Block a user