Fix screen scaling
We don't use wxWidget DPI (which is the screen DPI) for our on-screen display. Instead, we use 91 (?!?). Make this configurable in advanced config and use the set value in our scaling widget
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
* Released under GNU GPL v2+
|
||||
*/
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <widgets/zoom_correction_ctrl.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
@@ -55,7 +56,7 @@ private:
|
||||
double value = parent->GetValue();
|
||||
ZOOM_CORRECTION_UNITS units = static_cast<ZOOM_CORRECTION_UNITS>( parent->GetUnitsSelection() );
|
||||
|
||||
double dpi = GetDPI().x;
|
||||
double dpi = ADVANCED_CFG::GetCfg().m_ScreenDPI;
|
||||
double unitsPerInch = 25.4;
|
||||
|
||||
if( units == ZOOM_CORRECTION_UNITS::CM )
|
||||
@@ -222,6 +223,7 @@ int ZOOM_CORRECTION_CTRL::GetUnitsSelection() const
|
||||
return m_unitsChoice->GetSelection();
|
||||
}
|
||||
|
||||
|
||||
bool ZOOM_CORRECTION_CTRL::TransferDataToWindow()
|
||||
{
|
||||
m_slider->SetValue( (int)( *m_value * 100 ) );
|
||||
|
||||
Reference in New Issue
Block a user