UI tune-up

This commit is contained in:
Simon Rozman 2016-06-15 15:44:10 +02:00
parent fed1e6052a
commit ef9fa750a0
5 changed files with 21 additions and 24 deletions

View File

@ -24,7 +24,7 @@ wxEAPConfigDialogBase::wxEAPConfigDialogBase( wxWindow* parent, wxWindowID id, c
m_providers = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
sb_content->Add( m_providers, 1, wxEXPAND|wxALL, 5 );
sb_content->Add( m_providers, 1, wxEXPAND|wxALL, 10 );
m_buttons = new wxStdDialogButtonSizer();
m_buttonsOK = new wxButton( this, wxID_OK );

View File

@ -179,7 +179,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="border">10</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">1</property>
<object class="wxNotebook" expanded="1">

View File

@ -32,7 +32,7 @@ wxPAPConfigPanel::wxPAPConfigPanel(eap::config_pap &cfg, LPCTSTR pszCredTarget,
if (cfg.m_allow_save) {
m_credentials = new wxPAPCredentialsConfigPanel(cfg, pszCredTarget, this);
sb_content->Add(m_credentials, 0, wxALL|wxEXPAND, 5);
sb_content->Add(m_credentials, 0, wxEXPAND, 5);
m_label = NULL;
} else {
@ -40,11 +40,9 @@ wxPAPConfigPanel::wxPAPConfigPanel(eap::config_pap &cfg, LPCTSTR pszCredTarget,
m_label = new wxStaticText(this, wxID_ANY, _("This method requires no additional settings."), wxDefaultPosition, wxDefaultSize, 0);
m_label->Wrap(-1);
sb_content->Add(m_label, 0, wxALL|wxEXPAND, 5);
sb_content->Add(m_label, 0, wxEXPAND, 5);
}
sb_content->Add(10, 10, 1, wxEXPAND, 5);
this->SetSizer(sb_content);
this->Layout();

View File

@ -625,15 +625,14 @@ wxEAPTLSConfigPanel::wxEAPTLSConfigPanel(eap::config_tls &cfg, LPCTSTR pszCredTa
sb_content = new wxBoxSizer( wxVERTICAL );
m_server_trust = new wxEAPTLSServerTrustPanel(cfg, this);
sb_content->Add(m_server_trust, 0, wxALL|wxEXPAND, 5);
if (cfg.m_allow_save) {
sb_content->Add(m_server_trust, 0, wxDOWN|wxEXPAND, 5);
m_credentials = new wxEAPTLSCredentialsConfigPanel(cfg, pszCredTarget, this);
sb_content->Add(m_credentials, 0, wxALL|wxEXPAND, 5);
} else
sb_content->Add(m_credentials, 0, wxUP|wxEXPAND, 5);
} else {
sb_content->Add(m_server_trust, 0, wxEXPAND, 5);
m_credentials = NULL;
sb_content->Add(10, 10, 1, wxEXPAND, 5);
}
this->SetSizer(sb_content);
this->Layout();

View File

@ -89,6 +89,18 @@ wxEAPTTLSConfig::wxEAPTTLSConfig(eap::config_ttls &cfg, LPCTSTR pszCredTarget, w
wxBoxSizer* sb_content;
sb_content = new wxBoxSizer( wxVERTICAL );
m_inner_title = new wxStaticText(this, wxID_ANY, _("Inner Authentication"), wxDefaultPosition, wxDefaultSize, 0);
m_inner_title->SetFont(wxFont(18, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString));
m_inner_title->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVECAPTION ) );
sb_content->Add(m_inner_title, 0, wxALL|wxALIGN_RIGHT, 5);
m_inner_type = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT);
m_inner_type->SetToolTip( _("Select inner authentication method from the list") );
m_inner_type->AddPage(new wxPAPConfigPanel(m_cfg_pap, pszCredTarget, m_inner_type), _("PAP"));
sb_content->Add(m_inner_type, 0, wxALL|wxEXPAND, 5);
sb_content->Add(20, 20, 1, wxALL|wxEXPAND, 5);
m_outer_title = new wxStaticText(this, wxID_ANY, _("Outer Authentication"), wxDefaultPosition, wxDefaultSize, 0);
m_outer_title->SetFont(wxFont(18, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString));
m_outer_title->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVECAPTION ) );
@ -100,18 +112,6 @@ wxEAPTTLSConfig::wxEAPTTLSConfig(eap::config_ttls &cfg, LPCTSTR pszCredTarget, w
m_tls = new wxEAPTLSConfigPanel(m_cfg, pszCredTarget, this);
sb_content->Add(m_tls, 0, wxALL|wxEXPAND, 5);
sb_content->Add(20, 20, 1, wxEXPAND, 5);
m_inner_title = new wxStaticText(this, wxID_ANY, _("Inner Authentication"), wxDefaultPosition, wxDefaultSize, 0);
m_inner_title->SetFont(wxFont(18, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString));
m_inner_title->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVECAPTION ) );
sb_content->Add(m_inner_title, 0, wxALL|wxALIGN_RIGHT, 5);
m_inner_type = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT);
m_inner_type->SetToolTip( _("Select inner authentication method from the list") );
m_inner_type->AddPage(new wxPAPConfigPanel(m_cfg_pap, pszCredTarget, m_inner_type), _("PAP"));
sb_content->Add(m_inner_type, 0, wxALL|wxEXPAND, 5);
wxSize size = sb_content->CalcMin();
if (size.y > 500) {
// Increase the width to allow space for vertical scroll bar (to prevent horizontal one) and truncate the height.