From 2a734c8ea73b38541100faa18c2bce1372cc6dd5 Mon Sep 17 00:00:00 2001 From: openmonk Date: Sat, 13 Mar 2021 12:04:46 +0100 Subject: [PATCH] maximize button for resizable dialogs --- src/ui/equalizer/Equalizer.cpp | 2 +- src/ui/filebrowser/FileRenamer.cpp | 2 +- src/ui/labeleditor/LabelEditor.cpp | 2 +- src/ui/mediaviewer/importfiles/ImportFiles.cpp | 3 +-- src/ui/mediaviewer/portablemedia/PortableMedia.cpp | 2 +- src/ui/preferences/Preferences.cpp | 2 +- src/ui/radios/RadioEditor.cpp | 2 +- src/ui/trackedit/TrackEdit.cpp | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ui/equalizer/Equalizer.cpp b/src/ui/equalizer/Equalizer.cpp index e33d35494..e8f4df253 100644 --- a/src/ui/equalizer/Equalizer.cpp +++ b/src/ui/equalizer/Equalizer.cpp @@ -69,7 +69,7 @@ guEq10Band::guEq10Band( wxWindow * parent, guMediaCtrl * mediactrl ) //wxDialog( WindowSize.x = Config->ReadNum( CONFIG_KEY_EQUALIZER_WIDTH, 400, CONFIG_PATH_EQUALIZER ); WindowSize.y = Config->ReadNum( CONFIG_KEY_EQUALIZER_HEIGHT, 250, CONFIG_PATH_EQUALIZER ); - Create( parent, wxID_ANY, _( "Equalizer" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Equalizer" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); wxFileConfig * EqConfig = new wxFileConfig( wxEmptyString, wxEmptyString, guPATH_EQUALIZERS_FILENAME ); if( EqConfig ) diff --git a/src/ui/filebrowser/FileRenamer.cpp b/src/ui/filebrowser/FileRenamer.cpp index d8cd36dcf..ff54a2cd8 100644 --- a/src/ui/filebrowser/FileRenamer.cpp +++ b/src/ui/filebrowser/FileRenamer.cpp @@ -47,7 +47,7 @@ guFileRenamer::guFileRenamer( wxWindow * parent, guDbLibrary * db, const wxArray WindowSize.x = Config->ReadNum( CONFIG_KEY_FILE_RENAMER_SIZE_WIDTH, 500, CONFIG_PATH_FILE_RENAMER ); WindowSize.y = Config->ReadNum( CONFIG_KEY_FILE_RENAMER_SIZE_HEIGHT, 320, CONFIG_PATH_FILE_RENAMER ); - Create( parent, wxID_ANY, _( "Rename Files" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Rename Files" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER | wxMAXIMIZE_BOX ); this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/src/ui/labeleditor/LabelEditor.cpp b/src/ui/labeleditor/LabelEditor.cpp index be5a20696..739a0a74d 100644 --- a/src/ui/labeleditor/LabelEditor.cpp +++ b/src/ui/labeleditor/LabelEditor.cpp @@ -55,7 +55,7 @@ guLabelEditor::guLabelEditor( wxWindow * parent, guDbLibrary * db, const wxStrin WindowSize.y = Config->ReadNum( CONFIG_KEY_POSITIONS_LABELEDIT_HEIGHT, 300, CONFIG_PATH_POSITIONS ); //wxDialog( parent, wxID_ANY, _( "Songs Editor" ), wxDefaultPosition, wxSize( 625, 440 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) - Create( parent, wxID_ANY, title, WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, title, WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/src/ui/mediaviewer/importfiles/ImportFiles.cpp b/src/ui/mediaviewer/importfiles/ImportFiles.cpp index b25da60f2..ae953b2cf 100644 --- a/src/ui/mediaviewer/importfiles/ImportFiles.cpp +++ b/src/ui/mediaviewer/importfiles/ImportFiles.cpp @@ -48,7 +48,7 @@ guImportFiles::guImportFiles( wxWindow * parent, guMediaViewer * mediaviewer, gu WindowSize.x = Config->ReadNum( CONFIG_KEY_IMPORT_FILES_WIDTH, 480, CONFIG_PATH_IMPORT_FILES_POSITION ); WindowSize.y = Config->ReadNum( CONFIG_KEY_IMPORT_FILES_HEIGHT, 340, CONFIG_PATH_IMPORT_FILES_POSITION ); - Create( parent, wxID_ANY, _( "Import Files" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Import Files" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); CreateControls(); } @@ -255,7 +255,6 @@ void guImportFiles::OnAddFilesClicked( wxCommandEvent &event ) wxString( _( "wv files" ) ) + wxT( " (*.wv)|*.wv|" ) + wxString( _( "tta files" ) ) + wxT( " (*.tta)|*.tta|" ) + wxString( _( "mpc files" ) ) + wxT( " (*.mpc)|*.mpc|" ) + - wxString( _( "dsd files" ) ) + wxT( " (*.dsf)|*.dsf|" ) + wxString( _( "other files" ) ) + "|" + gst_ext_str, wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE|wxFD_PREVIEW ); if( FileDialog ) diff --git a/src/ui/mediaviewer/portablemedia/PortableMedia.cpp b/src/ui/mediaviewer/portablemedia/PortableMedia.cpp index ec008a998..a0a1eb7b6 100644 --- a/src/ui/mediaviewer/portablemedia/PortableMedia.cpp +++ b/src/ui/mediaviewer/portablemedia/PortableMedia.cpp @@ -685,7 +685,7 @@ guPortableMediaProperties::guPortableMediaProperties( wxWindow * parent, guPorta WindowSize.x = Config->ReadNum( CONFIG_KEY_POSITIONS_PMPROPERTIES_WIDTH, 570, CONFIG_PATH_POSITIONS ); WindowSize.y = Config->ReadNum( CONFIG_KEY_POSITIONS_PMPROPERTIES_HEIGHT, 420, CONFIG_PATH_POSITIONS ); - Create( parent, wxID_ANY, _( "Portable Media Properties" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Portable Media Properties" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/src/ui/preferences/Preferences.cpp b/src/ui/preferences/Preferences.cpp index 00ca7c913..96bd44b52 100644 --- a/src/ui/preferences/Preferences.cpp +++ b/src/ui/preferences/Preferences.cpp @@ -130,7 +130,7 @@ guPrefDialog::guPrefDialog( wxWindow* parent, guDbLibrary * db, int pagenum ) WindowSize.y = m_Config->ReadNum( CONFIG_KEY_PREFERENCES_HEIGHT, 530, CONFIG_PATH_PREFERENCES ); //wxDialog( parent, wxID_ANY, _( "Songs Editor" ), wxDefaultPosition, wxSize( 625, 440 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) - Create( parent, wxID_ANY, _( "Preferences" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Preferences" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); // m_MainLangChoices.Add( _( "Default" ) ); diff --git a/src/ui/radios/RadioEditor.cpp b/src/ui/radios/RadioEditor.cpp index 8ac19e200..6d9851493 100644 --- a/src/ui/radios/RadioEditor.cpp +++ b/src/ui/radios/RadioEditor.cpp @@ -25,7 +25,7 @@ namespace Guayadeque { // -------------------------------------------------------------------------------- // guRadioEditor::guRadioEditor( wxWindow* parent, const wxString& title, const wxString &name, const wxString &link ) : - wxDialog( parent, wxID_ANY, title, wxDefaultPosition, wxSize( 400,150 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) + wxDialog( parent, wxID_ANY, title, wxDefaultPosition, wxSize( 400,150 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/src/ui/trackedit/TrackEdit.cpp b/src/ui/trackedit/TrackEdit.cpp index 0a2639475..04b4b0a11 100644 --- a/src/ui/trackedit/TrackEdit.cpp +++ b/src/ui/trackedit/TrackEdit.cpp @@ -102,7 +102,7 @@ guTrackEditor::guTrackEditor( wxWindow * parent, guDbLibrary * db, guTrackArray WindowSize.y = Config->ReadNum( CONFIG_KEY_POSITIONS_TRACKEDIT_HEIGHT, 440, CONFIG_PATH_POSITIONS ); //wxDialog( parent, wxID_ANY, _( "Songs Editor" ), wxDefaultPosition, wxSize( 625, 440 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) - Create( parent, wxID_ANY, _( "Songs Editor" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + Create( parent, wxID_ANY, _( "Songs Editor" ), WindowPos, WindowSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ); // this->SetSizeHints( wxDefaultSize, wxDefaultSize );