Skip to content

Commit

Permalink
Decrease minimum windows sizes to fit to 800x600 resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Jun 4, 2021
1 parent e143c6c commit 269ef72
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 30 deletions.
11 changes: 7 additions & 4 deletions editor/gdre_cmp_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ ScriptCompDialog::ScriptCompDialog() {
add_child(file_selection);

VBoxContainer *script_vb = memnew(VBoxContainer);
script_vb->set_v_size_flags(SIZE_EXPAND_FILL);

//File list
file_list = memnew(ItemList);
file_list->set_custom_minimum_size(Size2(600, 400) * EDSCALE);
file_list->set_custom_minimum_size(Size2(400, 100) * EDSCALE);
file_list->set_h_size_flags(SIZE_EXPAND_FILL);
file_list->set_v_size_flags(SIZE_EXPAND_FILL);

HBoxContainer *file_list_hbc = memnew(HBoxContainer);
add_file = memnew(Button);
Expand All @@ -46,7 +49,7 @@ ScriptCompDialog::ScriptCompDialog() {
clear_files->connect("pressed", this, "_clear_pressed");
file_list_hbc->add_child(clear_files);

script_vb->add_margin_child(RTR("Script files:"), file_list);
script_vb->add_margin_child(RTR("Script files:"), file_list, true);
script_vb->add_child(file_list_hbc);

//Encryption key
Expand Down Expand Up @@ -132,7 +135,7 @@ Vector<uint8_t> ScriptCompDialog::get_key() const {

void ScriptCompDialog::_add_files_pressed() {

file_selection->popup_centered(Size2(800, 600));
file_selection->popup_centered(Size2(600, 400));
}

void ScriptCompDialog::_add_files_request(const PoolVector<String> &p_files) {
Expand Down Expand Up @@ -202,7 +205,7 @@ void ScriptCompDialog::_script_encryption_key_changed(const String &p_key) {

void ScriptCompDialog::_dir_select_pressed() {

target_folder_selection->popup_centered(Size2(800, 600));
target_folder_selection->popup_centered(Size2(600, 400));
}

void ScriptCompDialog::_dir_select_request(const String &p_path) {
Expand Down
7 changes: 5 additions & 2 deletions editor/gdre_dec_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ ScriptDecompDialog::ScriptDecompDialog() {
add_child(file_selection);

VBoxContainer *script_vb = memnew(VBoxContainer);
script_vb->set_v_size_flags(SIZE_EXPAND_FILL);

//File list
file_list = memnew(ItemList);
file_list->set_custom_minimum_size(Size2(600, 400) * EDSCALE);
file_list->set_custom_minimum_size(Size2(400, 100) * EDSCALE);
file_list->set_h_size_flags(SIZE_EXPAND_FILL);
file_list->set_v_size_flags(SIZE_EXPAND_FILL);

HBoxContainer *file_list_hbc = memnew(HBoxContainer);
add_file = memnew(Button);
Expand All @@ -47,7 +50,7 @@ ScriptDecompDialog::ScriptDecompDialog() {
clear_files->connect("pressed", this, "_clear_pressed");
file_list_hbc->add_child(clear_files);

script_vb->add_margin_child(RTR("Script files:"), file_list);
script_vb->add_margin_child(RTR("Script files:"), file_list, true);
script_vb->add_child(file_list_hbc);

//Script version
Expand Down
35 changes: 20 additions & 15 deletions editor/gdre_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ ResultDialog::ResultDialog() {

message = memnew(TextEdit);
message->set_readonly(true);
message->set_custom_minimum_size(Size2(1000, 300) * EDSCALE);
message->set_custom_minimum_size(Size2(600, 100) * EDSCALE);
message->set_h_size_flags(SIZE_EXPAND_FILL);
message->set_v_size_flags(SIZE_EXPAND_FILL);
script_vb->add_child(message);

add_child(script_vb);
Expand Down Expand Up @@ -230,7 +232,9 @@ OverwriteDialog::OverwriteDialog() {

message = memnew(TextEdit);
message->set_readonly(true);
message->set_custom_minimum_size(Size2(1000, 300) * EDSCALE);
message->set_custom_minimum_size(Size2(600, 100) * EDSCALE);
message->set_h_size_flags(SIZE_EXPAND_FILL);
message->set_v_size_flags(SIZE_EXPAND_FILL);
script_vb->add_child(message);

add_child(script_vb);
Expand Down Expand Up @@ -406,8 +410,9 @@ void GodotREEditor::init_gui(Control *p_control, HBoxContainer *p_menu, bool p_l

Label *about_label = memnew(Label);
about_hbc->add_child(about_label);
about_label->set_custom_minimum_size(Size2(600, 150) * EDSCALE);
about_label->set_custom_minimum_size(Size2(600, 100) * EDSCALE);
about_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
about_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
about_label->set_autowrap(true);
String about_text =
String("Godot RE Tools, ") + String(GDRE_VERSION) + String(" \n\n") +
Expand Down Expand Up @@ -543,31 +548,31 @@ void GodotREEditor::menu_option_pressed(int p_id) {

} break;
case MENU_CREATE_PCK: {
pck_source_folder->popup_centered(Size2(800, 600));
pck_source_folder->popup_centered(Size2(600, 400));
} break;
case MENU_EXT_PCK: {
pck_file_selection->popup_centered(Size2(800, 600));
pck_file_selection->popup_centered(Size2(600, 400));
} break;
case MENU_DECOMP_GDS: {
script_dialog_d->popup_centered(Size2(800, 600));
script_dialog_d->popup_centered(Size2(600, 400));
} break;
case MENU_COMP_GDS: {
script_dialog_c->popup_centered(Size2(800, 600));
script_dialog_c->popup_centered(Size2(600, 400));
} break;
case MENU_CONV_TO_TXT: {
bin_res_file_selection->popup_centered(Size2(800, 600));
bin_res_file_selection->popup_centered(Size2(600, 400));
} break;
case MENU_CONV_TO_BIN: {
txt_res_file_selection->popup_centered(Size2(800, 600));
txt_res_file_selection->popup_centered(Size2(600, 400));
} break;
case MENU_STEX_TO_PNG: {
stex_file_selection->popup_centered(Size2(800, 600));
stex_file_selection->popup_centered(Size2(600, 400));
} break;
case MENU_OSTR_TO_OGG: {
ostr_file_selection->popup_centered(Size2(800, 600));
ostr_file_selection->popup_centered(Size2(600, 400));
} break;
case MENU_SMPL_TO_WAV: {
smpl_file_selection->popup_centered(Size2(800, 600));
smpl_file_selection->popup_centered(Size2(600, 400));
} break;

case MENU_ABOUT_RE: {
Expand Down Expand Up @@ -1055,7 +1060,7 @@ void GodotREEditor::_pck_select_request(const String &p_path) {
memdelete(pck);
pck_file = p_path;

pck_dialog->popup_centered_minsize();
pck_dialog->popup_centered(Size2(600, 400));
}

void GodotREEditor::_pck_extract_files() {
Expand Down Expand Up @@ -1524,7 +1529,7 @@ void GodotREEditor::_pck_create_request(const String &p_path) {
}
pck_save_dialog->set_message(file_list);

pck_save_dialog->popup_centered(Size2(800, 600));
pck_save_dialog->popup_centered(Size2(600, 400));
}

void GodotREEditor::_pck_save_prep() {
Expand All @@ -1535,7 +1540,7 @@ void GodotREEditor::_pck_save_prep() {
} else {
pck_save_file_selection->add_filter("*.pck;PCK archive files");
}
pck_save_file_selection->popup_centered(Size2(800, 600));
pck_save_file_selection->popup_centered(Size2(600, 400));
}

#define PCK_PADDING 16
Expand Down
7 changes: 5 additions & 2 deletions editor/gdre_npck_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ NewPackDialog::NewPackDialog() {
set_resizable(true);

VBoxContainer *script_vb = memnew(VBoxContainer);
script_vb->set_v_size_flags(SIZE_EXPAND_FILL);

message = memnew(TextEdit);
message->set_readonly(true);
message->set_custom_minimum_size(Size2(1000, 300) * EDSCALE);
message->set_custom_minimum_size(Size2(600, 100) * EDSCALE);
message->set_h_size_flags(SIZE_EXPAND_FILL);
message->set_v_size_flags(SIZE_EXPAND_FILL);

script_vb->add_margin_child(RTR("Files:"), message);

Expand Down Expand Up @@ -114,7 +117,7 @@ void NewPackDialog::_val_change(double p_val) {
}

void NewPackDialog::_exe_select_pressed() {
emb_selection->popup_centered(Size2(800, 600));
emb_selection->popup_centered(Size2(600, 400));
}

void NewPackDialog::_exe_select_request(const String &p_path) {
Expand Down
9 changes: 5 additions & 4 deletions editor/gdre_pck_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PackDialog::PackDialog() {
add_child(target_folder_selection);

VBoxContainer *script_vb = memnew(VBoxContainer);
script_vb->set_v_size_flags(SIZE_EXPAND_FILL);

//Version inf label
vernfo = memnew(Label);
Expand All @@ -30,9 +31,9 @@ PackDialog::PackDialog() {

//File list
file_list = memnew(Tree);
file_list->set_custom_minimum_size(Size2(1000, 600) * EDSCALE);

file_list->set_custom_minimum_size(Size2(400, 100) * EDSCALE);
file_list->set_v_size_flags(SIZE_EXPAND_FILL);

file_list->set_columns(2);
file_list->set_column_titles_visible(true);

Expand All @@ -55,7 +56,7 @@ PackDialog::PackDialog() {

file_list->connect("item_edited", this, "_item_edited");

script_vb->add_margin_child(RTR("Files:"), file_list);
script_vb->add_margin_child(RTR("Files:"), file_list, true);

//Target directory
HBoxContainer *dir_hbc = memnew(HBoxContainer);
Expand Down Expand Up @@ -165,7 +166,7 @@ void PackDialog::add_file_to_item(TreeItem *p_item, const String &p_fullname, co

void PackDialog::_dir_select_pressed() {

target_folder_selection->popup_centered(Size2(800, 600));
target_folder_selection->popup_centered(Size2(600, 400));
}

void PackDialog::_dir_select_request(const String &p_path) {
Expand Down
6 changes: 3 additions & 3 deletions standalone/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ config/icon="res://icon.png"

[display]

window/size/width=1200
window/size/height=1024
window/dpi/allow_hidpi=true
window/size/width=800
window/size/height=600
window/dpi/allow_hidpi=false

[editor]

Expand Down

0 comments on commit 269ef72

Please sign in to comment.