summaryrefslogtreecommitdiff
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 33d36e5e9c..79c22f667a 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -44,7 +44,7 @@ void GotoLineDialog::popup_find_line(TextEdit *p_edit) {
line->set_text(itos(text_editor->cursor_get_line()));
line->select_all();
- popup_centered(Size2(180, 80));
+ popup_centered(Size2(180, 80) * EDSCALE);
line->grab_focus();
}
@@ -65,16 +65,20 @@ void GotoLineDialog::ok_pressed() {
GotoLineDialog::GotoLineDialog() {
set_title(TTR("Go to Line"));
+
+ VBoxContainer *vbc = memnew(VBoxContainer);
+ vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 8 * EDSCALE);
+ vbc->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 8 * EDSCALE);
+ vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -8 * EDSCALE);
+ vbc->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, -8 * EDSCALE);
+ add_child(vbc);
+
Label *l = memnew(Label);
l->set_text(TTR("Line Number:"));
- l->set_position(Point2(5, 5));
- add_child(l);
+ vbc->add_child(l);
line = memnew(LineEdit);
- line->set_anchor(MARGIN_RIGHT, ANCHOR_END);
- line->set_begin(Point2(15, 22));
- line->set_end(Point2(-15, 35));
- add_child(line);
+ vbc->add_child(line);
register_text_enter(line);
text_editor = NULL;