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:
Seth Hillbrand
2025-08-25 18:03:46 -07:00
parent 1df5ad0e4c
commit 6dd03bc735
7 changed files with 31 additions and 7 deletions
+3 -1
View File
@@ -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 ) );