Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed button image alignment on latest macos #44

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions app/include/gui/dpgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class MainDialog : public wxDialog
wxBoxSizer* leftSizer;
wxBoxSizer* panelSizer;
wxPanel* nullPanel;
wxBitmapButton* aboutButton;
wxBitmapButton* operationButton;
wxBitmapButton* showHideLog;
wxButton* aboutButton;
wxButton* operationButton;
wxButton* showHideLog;
wxStaticBoxSizer* logBox;
wxTextCtrl* logCtrl;

Expand Down Expand Up @@ -100,11 +100,11 @@ class DecodePanel : public wxPanel
};

wxTextCtrl* originalField;
wxBitmapButton* originalButton;
wxButton* originalButton;
wxTextCtrl* patchField;
wxBitmapButton* patchButton;
wxButton* patchButton;
wxButton* applyButton;
wxBitmapButton* decodeOptionsButton;
wxButton* decodeOptionsButton;

// Virtual event handlers, overide them in your derived class
virtual void OnOpenOriginal( wxCommandEvent& event ) { event.Skip(); }
Expand Down Expand Up @@ -148,14 +148,14 @@ class EncodePanel : public wxPanel
};

wxTextCtrl* originalField;
wxBitmapButton* originalButton;
wxButton* originalButton;
wxTextCtrl* modifiedField;
wxBitmapButton* modifiedButton;
wxButton* modifiedButton;
wxTextCtrl* patchField;
wxBitmapButton* patchButton;
wxButton* patchButton;
wxTextCtrl* descriptionField;
wxButton* createButton;
wxBitmapButton* encodeOptionsButton;
wxButton* encodeOptionsButton;

// Virtual event handlers, overide them in your derived class
virtual void OnOpenOriginal( wxCommandEvent& event ) { event.Skip(); }
Expand Down
2 changes: 0 additions & 2 deletions app/src/gui/DeltaPatcherMainDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ void DeltaPatcherMainDialog::ShowHideLog()
if(mainSizer->Detach(logBox)){ //hide log
logBox->GetStaticBox()->Show(false);
logCtrl->Show(false);
showHideLog->SetLabel(_("Show log >>"));
}else{ //show log
mainSizer->Add( logBox, 1, wxEXPAND|wxALL, 5 );
logBox->GetStaticBox()->Show();
logCtrl->Show();
showHideLog->SetLabel(_("<< Hide log"));
}

Update();
Expand Down
20 changes: 10 additions & 10 deletions app/src/gui/dpgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MainDialog::MainDialog( wxWindow* parent, wxWindowID id, const wxString& title,
wxBoxSizer* bSizer22;
bSizer22 = new wxBoxSizer( wxHORIZONTAL );

aboutButton = new wxBitmapButton( this, wxID_ABOUT, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
aboutButton = new wxButton( this, wxID_ABOUT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
aboutButton->SetToolTip( _("Shows information about this program.") );

bSizer22->Add( aboutButton, 0, wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 0 );
Expand All @@ -42,13 +42,13 @@ MainDialog::MainDialog( wxWindow* parent, wxWindowID id, const wxString& title,
wxBoxSizer* bSizer21;
bSizer21 = new wxBoxSizer( wxHORIZONTAL );

operationButton = new wxBitmapButton( this, wxID_OPERATION_BUTTON, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
operationButton = new wxButton( this, wxID_OPERATION_BUTTON, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
operationButton->SetToolTip( _("Switches between patch creation and patch application modes.") );

bSizer21->Add( operationButton, 0, wxBOTTOM|wxEXPAND, 0 );
bSizer21->AddSpacer(7);

showHideLog = new wxBitmapButton( this, wxID_SHOW_IDE_LOG, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
showHideLog = new wxButton( this, wxID_SHOW_IDE_LOG, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
showHideLog->SetToolTip( _("Hides/Shows the log window.") );

bSizer21->Add( showHideLog, 0, wxBOTTOM|wxEXPAND, 0 );
Expand Down Expand Up @@ -98,7 +98,7 @@ DecodePanel::DecodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
originalField->SetMaxLength( 0 );
sbSizer1->Add( originalField, 1, wxALL|wxEXPAND, 7 );

originalButton = new wxBitmapButton( this, wxID_DECODE_ORIGINAL_OPEN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
originalButton = new wxButton( this, wxID_DECODE_ORIGINAL_OPEN, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
originalButton->SetToolTip( _("Choose the file to patch.") );

sbSizer1->Add( originalButton, 0, wxALL, 5 );
Expand All @@ -113,7 +113,7 @@ DecodePanel::DecodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
patchField->SetMaxLength( 0 );
sbSizer3->Add( patchField, 1, wxALL|wxEXPAND, 7 );

patchButton = new wxBitmapButton( this, wxID_DECODE_PATCH_OPEN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
patchButton = new wxButton( this, wxID_DECODE_PATCH_OPEN, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
patchButton->SetToolTip( _("Choose the patch to be applied to the selected file.") );

sbSizer3->Add( patchButton, 0, wxALL, 5 );
Expand All @@ -131,7 +131,7 @@ DecodePanel::DecodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
decodeBottomSizer->Add( applyButton, 1, wxTOP|wxBOTTOM|wxEXPAND, 0 );
decodeBottomSizer->AddSpacer(7);

decodeOptionsButton = new wxBitmapButton( this, wxID_DECODE_OPTIONS_BUTTON, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
decodeOptionsButton = new wxButton( this, wxID_DECODE_OPTIONS_BUTTON, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
decodeOptionsButton->SetToolTip( _("Changes settings for patch application.") );

decodeBottomSizer->Add( decodeOptionsButton, 0, wxBOTTOM|wxTOP|wxEXPAND, 0 );
Expand Down Expand Up @@ -168,7 +168,7 @@ EncodePanel::EncodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
originalField->SetMaxLength( 0 );
sbSizer1->Add( originalField, 1, wxALL|wxEXPAND, 7 );

originalButton = new wxBitmapButton( this, wxID_ENCODE_ORIGINAL_OPEN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
originalButton = new wxButton( this, wxID_ENCODE_ORIGINAL_OPEN, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
originalButton->SetToolTip( _("Choose the original (untouched) file.") );

sbSizer1->Add( originalButton, 0, wxALL, 5 );
Expand All @@ -183,7 +183,7 @@ EncodePanel::EncodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
modifiedField->SetMaxLength( 0 );
sbSizer3->Add( modifiedField, 1, wxALL|wxEXPAND, 7 );

modifiedButton = new wxBitmapButton( this, wxID_ENCODE_MODIFIED_OPEN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
modifiedButton = new wxButton( this, wxID_ENCODE_MODIFIED_OPEN, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
modifiedButton->SetToolTip( _("Choose the modified file.") );

sbSizer3->Add( modifiedButton, 0, wxALL, 5 );
Expand All @@ -198,7 +198,7 @@ EncodePanel::EncodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
patchField->SetMaxLength( 0 );
sbSizer31->Add( patchField, 1, wxALL|wxEXPAND, 7 );

patchButton = new wxBitmapButton( this, wxID_ENCODE_PATCH_SAVE, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
patchButton = new wxButton( this, wxID_ENCODE_PATCH_SAVE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
patchButton->SetToolTip( _("Choose where to save the patch containing the differences between the original and the modified file.") );

sbSizer31->Add( patchButton, 0, wxALL, 5 );
Expand All @@ -225,7 +225,7 @@ EncodePanel::EncodePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
bSizer4->Add( createButton, 1, wxTOP|wxBOTTOM|wxEXPAND, 0 );
bSizer4->AddSpacer(7);

encodeOptionsButton = new wxBitmapButton( this, wxID_ENCODE_OPTIONS_BUTTON, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
encodeOptionsButton = new wxButton( this, wxID_ENCODE_OPTIONS_BUTTON, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | wxBU_EXACTFIT | wxBU_NOTEXT );
encodeOptionsButton->SetToolTip( _("Changes settings for patch creation.") );

bSizer4->Add( encodeOptionsButton, 0, wxBOTTOM|wxTOP|wxEXPAND, 0 );
Expand Down