mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix find-in-files and go-to-line dialog (partially)
This commit is contained in:
parent
f148e8eede
commit
e74876028e
3 changed files with 26 additions and 33 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue