Implement distructive-button-spacing as per Mac UI guidelines.

This commit is contained in:
Jeff Young 2021-11-14 20:33:32 +00:00
parent 9941a52e75
commit 9bb5310fa5
3 changed files with 23 additions and 10 deletions

View File

@ -22,11 +22,11 @@ DIALOG_PCM_PROGRESS_BASE::DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID
m_downloadText = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Waiting..."), wxDefaultPosition, wxDefaultSize, 0 ); m_downloadText = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Waiting..."), wxDefaultPosition, wxDefaultSize, 0 );
m_downloadText->Wrap( -1 ); m_downloadText->Wrap( -1 );
sbSizer1->Add( m_downloadText, 0, wxALL, 5 ); sbSizer1->Add( m_downloadText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_downloadGauge = new wxGauge( sbSizer1->GetStaticBox(), wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL|wxGA_SMOOTH ); m_downloadGauge = new wxGauge( sbSizer1->GetStaticBox(), wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL|wxGA_SMOOTH );
m_downloadGauge->SetValue( 0 ); m_downloadGauge->SetValue( 0 );
sbSizer1->Add( m_downloadGauge, 1, wxALL|wxEXPAND, 5 ); sbSizer1->Add( m_downloadGauge, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_panelDownload->SetSizer( sbSizer1 ); m_panelDownload->SetSizer( sbSizer1 );
@ -43,7 +43,7 @@ DIALOG_PCM_PROGRESS_BASE::DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID
m_overallGauge = new wxGauge( sbSizer2->GetStaticBox(), wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL ); m_overallGauge = new wxGauge( sbSizer2->GetStaticBox(), wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
m_overallGauge->SetValue( 0 ); m_overallGauge->SetValue( 0 );
sbSizer2->Add( m_overallGauge, 1, wxALL|wxEXPAND, 5 ); sbSizer2->Add( m_overallGauge, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer3->Add( sbSizer2, 0, wxEXPAND, 5 ); bSizer3->Add( sbSizer2, 0, wxEXPAND, 5 );
@ -51,7 +51,7 @@ DIALOG_PCM_PROGRESS_BASE::DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID
wxStaticBoxSizer* sbSizer3; wxStaticBoxSizer* sbSizer3;
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Details") ), wxVERTICAL ); sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Details") ), wxVERTICAL );
m_reporter = new WX_HTML_REPORT_BOX( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,200 ), wxHW_SCROLLBAR_AUTO ); m_reporter = new WX_HTML_REPORT_BOX( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHW_SCROLLBAR_AUTO );
sbSizer3->Add( m_reporter, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); sbSizer3->Add( m_reporter, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
@ -66,6 +66,9 @@ DIALOG_PCM_PROGRESS_BASE::DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID
m_buttonCancel = new wxButton( m_panel2, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonCancel = new wxButton( m_panel2, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); bSizer2->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer2->Add( 20, 0, 0, wxEXPAND, 5 );
m_buttonClose = new wxButton( m_panel2, wxID_OK, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonClose = new wxButton( m_panel2, wxID_OK, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonClose->SetDefault(); m_buttonClose->SetDefault();

View File

@ -45,7 +45,7 @@
<property name="minimum_size">400,300</property> <property name="minimum_size">400,300</property>
<property name="name">DIALOG_PCM_PROGRESS_BASE</property> <property name="name">DIALOG_PCM_PROGRESS_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">500,500</property> <property name="size">600,500</property>
<property name="style">wxCAPTION</property> <property name="style">wxCAPTION</property>
<property name="subclass">; ; forward_declare</property> <property name="subclass">; ; forward_declare</property>
<property name="title">Applying Package Changes</property> <property name="title">Applying Package Changes</property>
@ -123,7 +123,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -184,7 +184,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxGauge" expanded="1"> <object class="wxGauge" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -323,7 +323,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxGauge" expanded="1"> <object class="wxGauge" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -447,7 +447,7 @@
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size">-1,200</property> <property name="size">-1,-1</property>
<property name="style">wxHW_SCROLLBAR_AUTO</property> <property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; Not forward_declare</property> <property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; Not forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
@ -551,6 +551,16 @@
<event name="OnButtonClick">OnCancelClicked</event> <event name="OnButtonClick">OnCancelClicked</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL</property>

View File

@ -55,7 +55,7 @@ class DIALOG_PCM_PROGRESS_BASE : public wxDialog
public: public:
DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Applying Package Changes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,500 ), long style = wxCAPTION ); DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Applying Package Changes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,500 ), long style = wxCAPTION );
~DIALOG_PCM_PROGRESS_BASE(); ~DIALOG_PCM_PROGRESS_BASE();
}; };