summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-31 07:52:16 +0100
committerGitHub <noreply@github.com>2019-10-31 07:52:16 +0100
commit7c98f0d3f879745db70cc40076145a13dfde732f (patch)
treef6e342ed72c59f47ada7769e69b4a50d59ff9010 /editor
parentd482a1d8e8b4e68f2f386ba618cd091c79c20424 (diff)
parent27ad8609e2c8ad40de7475f0cd5b7f8e2dc77f20 (diff)
Merge pull request #33189 from Calinou/configure-snap-improve-primary-step
Improve the primary line setting display in the Configure Snap dialog
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 9dd6c600bf..2d9a713cad 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -133,8 +133,12 @@ public:
grid_step_y->set_h_size_flags(SIZE_EXPAND_FILL);
child_container->add_child(grid_step_y);
+ child_container = memnew(GridContainer);
+ child_container->set_columns(2);
+ container->add_child(child_container);
+
label = memnew(Label);
- label->set_text(TTR("Primary Line Every"));
+ label->set_text(TTR("Primary Line Every:"));
label->set_h_size_flags(SIZE_EXPAND_FILL);
child_container->add_child(label);
@@ -143,16 +147,14 @@ public:
primary_grid_steps->set_step(1);
primary_grid_steps->set_max(100);
primary_grid_steps->set_allow_greater(true);
+ primary_grid_steps->set_suffix(TTR("steps"));
primary_grid_steps->set_h_size_flags(SIZE_EXPAND_FILL);
child_container->add_child(primary_grid_steps);
- label = memnew(Label);
- label->set_text(TTR("steps"));
- label->set_h_size_flags(SIZE_EXPAND_FILL);
- child_container->add_child(label);
-
container->add_child(memnew(HSeparator));
+ // We need to create another GridContainer with the same column count,
+ // so we can put an HSeparator above
child_container = memnew(GridContainer);
child_container->set_columns(2);
container->add_child(child_container);