Improve hidpi color swatch sizes in layer selectors on MSW.
This commit is contained in:
parent
5f153eef7f
commit
73e0498768
|
@ -146,16 +146,6 @@ COLOR_SWATCH::COLOR_SWATCH( wxWindow* aParent, const COLOR4D& aColor, int aID,
|
|||
m_checkerboardSize = ConvertDialogToPixels( CHECKERBOARD_SIZE_DU );
|
||||
m_checkerboardBg = aParent->GetBackgroundColour();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// These need additional scaling on Windows because of some discrepancy between pixel and
|
||||
// content scaling that only affects certain widgets on Windows HiDPI. On other platforms, the
|
||||
// value returned by ConvertDialogToPixels appears to be correct.
|
||||
DPI_SCALING_COMMON dpi( nullptr, aParent );
|
||||
|
||||
m_size /= dpi.GetContentScaleFactor();
|
||||
m_checkerboardSize /= dpi.GetContentScaleFactor();
|
||||
#endif
|
||||
|
||||
auto sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
SetSizer( sizer );
|
||||
|
||||
|
|
|
@ -37,12 +37,7 @@ void GBR_LAYER_BOX_SELECTOR::Resync()
|
|||
Freeze();
|
||||
Clear();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
DPI_SCALING_COMMON dpi( nullptr, this );
|
||||
int size = static_cast<int>( 14 / dpi.GetContentScaleFactor() );
|
||||
#else
|
||||
const int size = 14;
|
||||
#endif
|
||||
|
||||
GERBER_FILE_IMAGE_LIST& images = GERBER_FILE_IMAGE_LIST::GetImagesList();
|
||||
|
||||
|
|
|
@ -43,12 +43,7 @@ void PCB_LAYER_BOX_SELECTOR::Resync()
|
|||
Freeze();
|
||||
Clear();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
DPI_SCALING_COMMON dpi( nullptr, this );
|
||||
int size = static_cast<int>( 14 / dpi.GetContentScaleFactor() );
|
||||
#else
|
||||
const int size = 14;
|
||||
#endif
|
||||
|
||||
LSET show = LSET::AllLayersMask() & ~m_layerMaskDisable;
|
||||
LSET activated = getEnabledLayers() & ~m_layerMaskDisable;
|
||||
|
|
Loading…
Reference in New Issue