Fix GAL display options panel spin button layout on windows.

Fixes lp:1829224

https://bugs.launchpad.net/kicad/+bug/1829224
This commit is contained in:
Wayne Stambaugh 2019-05-15 14:58:47 -04:00
parent 44e111b37e
commit d34433a1df
1 changed files with 12 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -100,12 +100,13 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
m_gridLineWidthSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(), m_gridLineWidthSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(),
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS ); wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS );
sGridSettingsGrid->Add( m_gridLineWidthSpinBtn, 0, wxALL | wxALIGN_CENTER_VERTICAL, 0 ); sGridSettingsGrid->Add( m_gridLineWidthSpinBtn, 0,
wxEXPAND | wxTOP | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 3 );
l_gridLineWidthUnits = new wxStaticText( sGridSettings->GetStaticBox(), l_gridLineWidthUnits = new wxStaticText( sGridSettings->GetStaticBox(),
wxID_ANY, _( "px" ) ); wxID_ANY, _( "px" ) );
l_gridLineWidthUnits->Wrap( -1 ); l_gridLineWidthUnits->Wrap( -1 );
sGridSettingsGrid->Add( l_gridLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); sGridSettingsGrid->Add( l_gridLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
l_gridMinSpacing = new wxStaticText( sGridSettings->GetStaticBox(), l_gridMinSpacing = new wxStaticText( sGridSettings->GetStaticBox(),
wxID_ANY, _( "Min grid spacing:" ) ); wxID_ANY, _( "Min grid spacing:" ) );
@ -117,14 +118,15 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
m_gridMinSpacingSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(), m_gridMinSpacingSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(),
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS ); wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS );
sGridSettingsGrid->Add( m_gridMinSpacingSpinBtn, 0, wxALL | wxALIGN_CENTER_VERTICAL, 0 ); sGridSettingsGrid->Add( m_gridMinSpacingSpinBtn, 0,
wxEXPAND | wxTOP | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 3 );
l_gridMinSpacingUnits = new wxStaticText( sGridSettings->GetStaticBox(), l_gridMinSpacingUnits = new wxStaticText( sGridSettings->GetStaticBox(),
wxID_ANY, _( "px" ) ); wxID_ANY, _( "px" ) );
l_gridMinSpacingUnits->Wrap( -1 ); l_gridMinSpacingUnits->Wrap( -1 );
sGridSettingsGrid->Add( l_gridMinSpacingUnits, 0, wxALL, 5 ); sGridSettingsGrid->Add( l_gridMinSpacingUnits, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
sGridSettings->Add( sGridSettingsGrid, 1, wxALL|wxEXPAND, 5 ); sGridSettings->Add( sGridSettingsGrid, 1, wxALL | wxEXPAND, 5 );
sLeftSizer->Add( sGridSettings, 0, wxTOP | wxBOTTOM | wxRIGHT | wxEXPAND, 5 ); sLeftSizer->Add( sGridSettings, 0, wxTOP | wxBOTTOM | wxRIGHT | wxEXPAND, 5 );
@ -168,7 +170,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
m_cursorShape = new wxRadioBox( this, wxID_ANY, m_cursorShape = new wxRadioBox( this, wxID_ANY,
_( "Cursor shape:" ), wxDefaultPosition, wxDefaultSize, _( "Cursor Shape:" ), wxDefaultPosition, wxDefaultSize,
m_CursorShapeNChoices, m_CursorShapeChoices, 1, m_CursorShapeNChoices, m_CursorShapeChoices, 1,
wxRA_SPECIFY_COLS ); wxRA_SPECIFY_COLS );