Make GUI DPI-aware

This commit is contained in:
2018-09-17 11:43:19 +02:00
parent dd0bceafdc
commit 10b321a92c
18 changed files with 192 additions and 184 deletions

View File

@@ -11,7 +11,7 @@
///////////////////////////////////////////////////////////////////////////
wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style )
{
wxStaticBoxSizer* sb_outer_identity;
sb_outer_identity = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outer Identity") ), wxVERTICAL );
@@ -20,14 +20,14 @@ wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, c
sb_outer_identity_horiz = new wxBoxSizer( wxHORIZONTAL );
m_outer_identity_icon = new wxStaticBitmap( sb_outer_identity->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
sb_outer_identity_horiz->Add( m_outer_identity_icon, 0, wxALL, 5 );
sb_outer_identity_horiz->Add( m_outer_identity_icon, 0, wxALL, FromDIP(5) );
wxBoxSizer* sb_outer_identity_vert;
sb_outer_identity_vert = new wxBoxSizer( wxVERTICAL );
m_outer_identity_label = new wxStaticText( sb_outer_identity->GetStaticBox(), wxID_ANY, _("Select the user ID supplicant introduces itself as to authenticator:"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_label->Wrap( 440 );
sb_outer_identity_vert->Add( m_outer_identity_label, 0, wxALL|wxEXPAND, 5 );
m_outer_identity_label->Wrap( FromDIP(440) );
sb_outer_identity_vert->Add( m_outer_identity_label, 0, wxALL|wxEXPAND, FromDIP(5) );
wxBoxSizer* sb_outer_identity_radio;
sb_outer_identity_radio = new wxBoxSizer( wxVERTICAL );
@@ -35,12 +35,12 @@ wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, c
m_outer_identity_same = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("&True identity"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_outer_identity_same->SetToolTip( _("Use my true user name") );
sb_outer_identity_radio->Add( m_outer_identity_same, 1, wxEXPAND, 5 );
sb_outer_identity_radio->Add( m_outer_identity_same, 1, wxEXPAND, FromDIP(5) );
m_outer_identity_empty = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("Use &empty outer identity"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_empty->SetToolTip( _("Ommit my user name and use @mydomain.org only") );
sb_outer_identity_radio->Add( m_outer_identity_empty, 1, wxEXPAND, 5 );
sb_outer_identity_radio->Add( m_outer_identity_empty, 1, wxEXPAND, FromDIP(5) );
wxBoxSizer* sb_outer_identity_custom;
sb_outer_identity_custom = new wxBoxSizer( wxHORIZONTAL );
@@ -48,24 +48,24 @@ wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, c
m_outer_identity_custom = new wxRadioButton( sb_outer_identity->GetStaticBox(), wxID_ANY, _("&Custom outer identity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_custom->SetToolTip( _("Specify custom outer identity") );
sb_outer_identity_custom->Add( m_outer_identity_custom, 0, wxEXPAND, 5 );
sb_outer_identity_custom->Add( m_outer_identity_custom, 0, wxEXPAND, FromDIP(5) );
m_outer_identity_custom_val = new wxTextCtrl( sb_outer_identity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outer_identity_custom_val->SetToolTip( _("Custom outer identity to use") );
sb_outer_identity_custom->Add( m_outer_identity_custom_val, 1, wxEXPAND, 5 );
sb_outer_identity_custom->Add( m_outer_identity_custom_val, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity_radio->Add( sb_outer_identity_custom, 1, wxEXPAND, 5 );
sb_outer_identity_radio->Add( sb_outer_identity_custom, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity_vert->Add( sb_outer_identity_radio, 0, wxEXPAND|wxALL, 5 );
sb_outer_identity_vert->Add( sb_outer_identity_radio, 0, wxEXPAND|wxALL, FromDIP(5) );
sb_outer_identity_horiz->Add( sb_outer_identity_vert, 1, wxEXPAND, 5 );
sb_outer_identity_horiz->Add( sb_outer_identity_vert, 1, wxEXPAND, FromDIP(5) );
sb_outer_identity->Add( sb_outer_identity_horiz, 0, wxEXPAND, 5 );
sb_outer_identity->Add( sb_outer_identity_horiz, 0, wxEXPAND, FromDIP(5) );
this->SetSizer( sb_outer_identity );