diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-10 16:13:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-10 19:12:39 +0100 |
commit | ec950f8ebb2745ccff2275dcc09d2034cd73dfeb (patch) | |
tree | 4717b5ae728a90ef39b66f2cd1f04e46d023eed8 | |
parent | cc8ffd0f49662aaa9d754239c071b207327c896f (diff) |
ditch the font/screen-scaling thing
its of limited utility wrt the vcl layout work and optimal size widgets,
and its confuses people looking for hidpi settings
Change-Id: I37d21b480446f9fe2845b3a2d9fd59cdeddf1a93
-rw-r--r-- | cui/source/options/optgdlg.cxx | 15 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/optviewpage.ui | 47 | ||||
-rw-r--r-- | include/svtools/apearcfg.hxx | 4 | ||||
-rw-r--r-- | include/vcl/settings.hxx | 6 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 23 | ||||
-rw-r--r-- | sc/inc/global.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 14 | ||||
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 52 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 34 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 34 |
13 files changed, 42 insertions, 219 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index bba62a3cf18f..1f6019fc98ba 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -619,7 +619,6 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet) , mpDrawinglayerOpt(new SvtOptionsDrawinglayer) , mpOpenGLConfig(new svt::OpenGLCfg) { - get(m_pWindowSizeMF, "windowsize"); get(m_pIconSizeLB, "iconsize"); get(m_pSidebarIconSizeLB, "sidebariconsize"); get(m_pIconStyleLB, "iconstyle"); @@ -701,7 +700,6 @@ void OfaViewTabPage::dispose() pCanvasSettings = nullptr; delete pAppearanceCfg; pAppearanceCfg = nullptr; - m_pWindowSizeMF.clear(); m_pIconSizeLB.clear(); m_pSidebarIconSizeLB.clear(); m_pIconStyleLB.clear(); @@ -795,17 +793,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) bool bAppearanceChanged = false; - - // Screen Scaling - sal_uInt16 nOldScale = pAppearanceCfg->GetScaleFactor(); - sal_uInt16 nNewScale = (sal_uInt16)m_pWindowSizeMF->GetValue(); - - if ( nNewScale != nOldScale ) - { - pAppearanceCfg->SetScaleFactor(nNewScale); - bAppearanceChanged = true; - } - // Mouse Snap Mode SnapType eOldSnap = pAppearanceCfg->GetSnapMode(); SnapType eNewSnap = (SnapType)m_pMousePosLB->GetSelectEntryPos(); @@ -941,8 +928,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_pIconStyleLB->SelectEntryPos( nStyleLB_InitialSelection ); m_pIconStyleLB->SaveValue(); - // Screen Scaling - m_pWindowSizeMF->SetValue ( pAppearanceCfg->GetScaleFactor() ); // Mouse Snap m_pMousePosLB->SelectEntryPos((sal_Int32)pAppearanceCfg->GetSnapMode()); m_pMousePosLB->SaveValue(); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 60df261b5de9..89d76b497f6b 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -79,7 +79,6 @@ class SvtTabAppearanceCfg; class OfaViewTabPage : public SfxTabPage { private: - VclPtr<MetricField> m_pWindowSizeMF; VclPtr<ListBox> m_pIconSizeLB; VclPtr<ListBox> m_pSidebarIconSizeLB; VclPtr<ListBox> m_pIconStyleLB; diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui index 537853cd37d3..deca7251f5a9 100644 --- a/cui/uiconfig/ui/optviewpage.ui +++ b/cui/uiconfig/ui/optviewpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.19.0 --> +<!-- Generated with glade 3.20.0 --> <interface> <requires lib="gtk+" version="3.0"/> <object class="GtkAdjustment" id="adjustment1"> @@ -306,33 +306,6 @@ <property name="row_spacing">6</property> <property name="column_spacing">12</property> <child> - <object class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="label" translatable="yes">Sc_aling:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">windowsize:0%</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="windowsize:0%"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">start</property> - <property name="invisible_char">•</property> - <property name="adjustment">adjustment1</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -343,7 +316,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> @@ -367,7 +340,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -382,7 +355,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> @@ -396,7 +369,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -411,7 +384,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="top_attach">3</property> <property name="width">2</property> </packing> </child> @@ -426,7 +399,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">5</property> + <property name="top_attach">4</property> </packing> </child> <child> @@ -439,7 +412,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">5</property> + <property name="top_attach">4</property> </packing> </child> <child> @@ -453,7 +426,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -468,7 +441,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">1</property> </packing> </child> </object> diff --git a/include/svtools/apearcfg.hxx b/include/svtools/apearcfg.hxx index 2dd178800a36..98cd37c57aa5 100644 --- a/include/svtools/apearcfg.hxx +++ b/include/svtools/apearcfg.hxx @@ -41,7 +41,6 @@ enum class DragMode { class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem { DragMode nDragMode ; - short nScaleFactor ; SnapType nSnapMode ; MouseMiddleButtonAction nMiddleMouse; #if defined( UNX ) @@ -66,9 +65,6 @@ public: DragMode GetDragMode () const { return nDragMode; } - sal_uInt16 GetScaleFactor () const { return nScaleFactor; } - void SetScaleFactor ( sal_uInt16 nSet ); - SnapType GetSnapMode () const { return nSnapMode; } void SetSnapMode ( SnapType nSet ); diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index acbacf3346d0..93b78d292f62 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -501,12 +501,6 @@ public: void SetCursorBlinkTime( sal_uInt64 nBlinkTime ); sal_uInt64 GetCursorBlinkTime() const; - void SetScreenZoom( sal_uInt16 nPercent ); - sal_uInt16 GetScreenZoom() const; - - void SetScreenFontZoom( sal_uInt16 nPercent ); - sal_uInt16 GetScreenFontZoom() const; - void SetDragFullOptions( DragFullOptions nOptions ); DragFullOptions GetDragFullOptions() const; diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ca23bd80be2d..fa8657683cfb 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2621,29 +2621,6 @@ <info> <desc>Contains window and dialog settings.</desc> </info> - <prop oor:name="FontScaling" oor:type="xs:short" oor:nillable="false"> - <!--OldPath: General/View --> - <!--OldLocation: soffice.cfg--> - <!--UIHints: Tools Options - General View [Section] Display--> - <info> - <desc>Specifies the scaling only of the screen representation - [UNIT=%].</desc> - <label>Scaling</label> - </info> - <constraints> - <minInclusive oor:value="50"> - <info> - <desc>Specifies the minimum range of the scaling.</desc> - </info> - </minInclusive> - <maxInclusive oor:value="200"> - <info> - <desc>Specifies the maximum range of the scaling.</desc> - </info> - </maxInclusive> - </constraints> - <value>100</value> - </prop> <group oor:name="NewDocumentHandling"> <info> <desc>Contains settings to change new document window behavior.</desc> diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index bb2f7b2d8c9c..7b8fc93b50a7 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -500,6 +500,8 @@ class ScGlobal static ScFieldEditEngine* pFieldEditEngine; + static void InitPPT(); + public: static SvtSysLocale* pSysLocale; // for faster access a pointer to the single instance provided by SvtSysLocale @@ -556,8 +558,6 @@ public: static void InitAddIns(); static void Clear(); // at the end of the program - static void UpdatePPT(OutputDevice* pDev); - static void InitTextHeight(SfxItemPool* pPool); static SvxBrushItem* GetEmptyBrushItem() { return pEmptyBrushItem; } static SvxBrushItem* GetButtonBrushItem(); diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 04c91be91491..f6a012cd3250 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -130,8 +130,6 @@ sal_uInt16 ScGlobal::nStdRowHeight = 256; long ScGlobal::nLastRowHeightExtra = 0; long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH; -static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y - SfxViewShell* pScActiveViewShell = nullptr; //FIXME: Make this a member sal_uInt16 nScClickMouseModifier = 0; //FIXME: This too sal_uInt16 nScFillModeMouseModifier = 0; //FIXME: And this @@ -521,7 +519,7 @@ void ScGlobal::Init() pEmbeddedBrushItem = new SvxBrushItem( Color( COL_LIGHTCYAN ), ATTR_BACKGROUND ); pProtectedBrushItem = new SvxBrushItem( Color( COL_LIGHTGRAY ), ATTR_BACKGROUND ); - UpdatePPT(nullptr); + InitPPT(); //ScCompiler::InitSymbolsNative(); // ScParameterClassification _after_ Compiler, needs function resources if // arguments are to be merged in, which in turn need strings of function @@ -536,23 +534,12 @@ void ScGlobal::Init() // ScDocumentPool::InitVersionMaps() has been called earlier already } -void ScGlobal::UpdatePPT( OutputDevice* pDev ) +void ScGlobal::InitPPT() { - sal_uInt16 nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom(); - if ( nCurrentZoom != nPPTZoom ) - { - // Screen PPT values must be updated when ScreenZoom has changed. - // If called from Window::DataChanged, the window is passed as pDev, - // to make sure LogicToPixel uses a device which already uses the new zoom. - // For the initial settings, NULL is passed and GetDefaultDevice used. - - if ( !pDev ) - pDev = Application::GetDefaultDevice(); - Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MAP_TWIP ); - nScreenPPTX = aPix1000.X() / 100000.0; - nScreenPPTY = aPix1000.Y() / 100000.0; - nPPTZoom = nCurrentZoom; - } + OutputDevice* pDev = Application::GetDefaultDevice(); + Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MAP_TWIP ); + nScreenPPTX = aPix1000.X() / 100000.0; + nScreenPPTY = aPix1000.Y() / 100000.0; } const OUString& ScGlobal::GetClipDocName() diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index df98ab9fe469..e3531bddc5bc 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1905,8 +1905,6 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt ) { ScTabView* pView = pViewData->GetView(); - // update scale in case the UI ScreenZoom has changed - ScGlobal::UpdatePPT(this); pView->RecalcPPT(); // RepeatResize in case scroll bar sizes have changed diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 5133f8f94a85..dde0d8cc55de 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -749,20 +749,6 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { - // When the screen zoom factor has changed then reset the zoom - // factor of the frame to always display the whole page. - const AllSettings* pOldSettings = rDCEvt.GetOldSettings (); - const AllSettings& rNewSettings = GetSettings (); - if (pOldSettings && mpViewShell) - { - if (pOldSettings->GetStyleSettings().GetScreenZoom() - != rNewSettings.GetStyleSettings().GetScreenZoom()) - { - mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD); - } - } - /* Rearrange or initiate Resize for scroll bars since the size of the scroll bars my have changed. Within this, inside the resize- handler, the size of the scroll bars will be asked from the diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index bba8cd0a8725..f25028691f12 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -28,7 +28,6 @@ #define DEFAULT_DRAGMODE DragMode::SystemDep #define DEFAULT_SNAPMODE SnapType::ToButton -#define DEFAULT_SCALEFACTOR 100 #if defined UNX #define DEFAULT_AAMINHEIGHT 8 #endif @@ -40,7 +39,6 @@ bool SvtTabAppearanceCfg::bInitialized = false; SvtTabAppearanceCfg::SvtTabAppearanceCfg() :ConfigItem(OUString("Office.Common/View")) ,nDragMode ( DEFAULT_DRAGMODE ) - ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) ,nMiddleMouse ( MouseMiddleButtonAction::AutoScroll ) #if defined( UNX ) @@ -64,26 +62,25 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() { switch(nProp) { - case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: //"Window/Drag" + case 0: //"Window/Drag" { short nTmp; if (*pValues >>= nTmp) nDragMode = (DragMode)nTmp; break; } - case 2: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse", - case 3: + case 1: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse", + case 2: { short nTmp; if (*pValues >>= nTmp) nSnapMode = (SnapType)nTmp; //"Dialog/MousePositioning", break; } - case 4: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", + case 3: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", #if defined( UNX ) - case 5: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled", - case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 4: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled", + case 5: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -102,14 +99,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() { static const sal_Char* aPropNames[] = { - "FontScaling" // 0 - ,"Window/Drag" // 1 - ,"Menu/FollowMouse" // 2 - ,"Dialog/MousePositioning" // 3 - ,"Dialog/MiddleMouseButton" // 4 + "Window/Drag" // 0 + ,"Menu/FollowMouse" // 1 + ,"Dialog/MousePositioning" // 2 + ,"Dialog/MiddleMouseButton" // 3 #if defined( UNX ) - ,"FontAntiAliasing/Enabled" // 5 - ,"FontAntiAliasing/MinPixelHeight" // 6 + ,"FontAntiAliasing/Enabled" // 4 + ,"FontAntiAliasing/MinPixelHeight" // 5 #endif }; const int nCount = SAL_N_ELEMENTS( aPropNames ); @@ -133,14 +129,13 @@ void SvtTabAppearanceCfg::ImplCommit() { switch(nProp) { - case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= (short)nDragMode; break; //"Window/Drag", - case 2: pValues[nProp] <<= bMenuMouseFollow; break; //"Menu/FollowMouse", - case 3: pValues[nProp] <<= (short)nSnapMode; break; //"Dialog/MousePositioning", - case 4: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; //"Dialog/MiddleMouseButton", + case 0: pValues[nProp] <<= (short)nDragMode; break; // "Window/Drag", + case 1: pValues[nProp] <<= bMenuMouseFollow; break; // "Menu/FollowMouse", + case 2: pValues[nProp] <<= (short)nSnapMode; break; // "Dialog/MousePositioning", + case 3: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; // "Dialog/MiddleMouseButton", #if defined( UNX ) - case 5: pValues[nProp] <<= bFontAntialiasing; break; // "FontAntialising/Enabled", - case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 4: pValues[nProp] <<= bFontAntialiasing; break; // "FontAntialising/Enabled", + case 5: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -151,12 +146,6 @@ void SvtTabAppearanceCfg::Notify( const css::uno::Sequence< OUString >& ) { } -void SvtTabAppearanceCfg::SetScaleFactor ( sal_uInt16 nSet ) -{ - nScaleFactor = nSet; - SetModified(); -} - void SvtTabAppearanceCfg::SetSnapMode ( SnapType nSet ) { nSnapMode = nSet; @@ -183,11 +172,6 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); - // Screen and ScreenFont Scaling - - hAppStyle.SetScreenZoom( nScaleFactor ); - hAppStyle.SetScreenFontZoom( nScaleFactor ); - #if defined( UNX ) // font anti aliasing hAppStyle.SetAntialiasingMinPixelHeight( nAAMinPixelHeight ); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index cb84dbe0aaa6..500877a2b559 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -171,8 +171,6 @@ struct ImplStyleData ToolbarIconSize mnToolbarIconSize; bool mnUseFlatMenus; StyleSettingsOptions mnOptions; - sal_uInt16 mnScreenZoom; - sal_uInt16 mnScreenFontZoom; bool mbHighContrast; bool mbUseSystemUIFonts; bool mbAutoMnemonic; @@ -539,8 +537,6 @@ ImplStyleData::ImplStyleData() : mnAntialiasedMin = 0; mnCursorSize = 2; mnCursorBlinkTime = STYLE_CURSOR_NOBLINKTIME; - mnScreenZoom = 100; - mnScreenFontZoom = 100; mnDragFullOptions = DragFullOptions::All; mnSelectionOptions = SelectionOptions::NONE; mnDisplayOptions = DisplayOptions::NONE; @@ -648,8 +644,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) : mnAntialiasedMin = rData.mnAntialiasedMin; mnCursorSize = rData.mnCursorSize; mnCursorBlinkTime = rData.mnCursorBlinkTime; - mnScreenZoom = rData.mnScreenZoom; - mnScreenFontZoom = rData.mnScreenFontZoom; mnDragFullOptions = rData.mnDragFullOptions; mnSelectionOptions = rData.mnSelectionOptions; mnDisplayOptions = rData.mnDisplayOptions; @@ -1834,32 +1828,6 @@ StyleSettings::GetCursorBlinkTime() const } void -StyleSettings::SetScreenZoom( sal_uInt16 nPercent ) -{ - CopyData(); - mxData->mnScreenZoom = nPercent; -} - -sal_uInt16 -StyleSettings::GetScreenZoom() const -{ - return mxData->mnScreenZoom; -} - -void -StyleSettings::SetScreenFontZoom( sal_uInt16 nPercent ) -{ - CopyData(); - mxData->mnScreenFontZoom = nPercent; -} - -sal_uInt16 -StyleSettings::GetScreenFontZoom() const -{ - return mxData->mnScreenFontZoom; -} - -void StyleSettings::SetDragFullOptions( DragFullOptions nOptions ) { CopyData(); @@ -2312,8 +2280,6 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const (mxData->mnSplitSize == rSet.mxData->mnSplitSize) && (mxData->mnSpinSize == rSet.mxData->mnSpinSize) && (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) && - (mxData->mnScreenZoom == rSet.mxData->mnScreenZoom) && - (mxData->mnScreenFontZoom == rSet.mxData->mnScreenFontZoom) && (mxData->mbHighContrast == rSet.mxData->mbHighContrast) && (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) && (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) && diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index dbed70369436..c94c4c5c4acb 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1138,14 +1138,13 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p // setup the scale factor for Hi-DPI displays mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); + mnDPIX = mpWindowImpl->mpFrameData->mnDPIX; + mnDPIY = mpWindowImpl->mpFrameData->mnDPIY; if (!utl::ConfigManager::IsAvoidConfig()) { const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings(); - sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); - mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; - mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; - maFont = rStyleSettings.GetAppFont(); + maFont = rStyleSettings.GetAppFont(); if ( nStyle & WB_3DLOOK ) { @@ -1160,8 +1159,6 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p } else { - mnDPIX = 96; - mnDPIY = 96; maFont = GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::NONE ); } @@ -1326,13 +1323,12 @@ void Window::ImplInitResolutionSettings() // recalculate AppFont-resolution and DPI-resolution if (mpWindowImpl->mbFrame) { - const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings(); - sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); - mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; - mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; + mnDPIX = mpWindowImpl->mpFrameData->mnDPIX; + mnDPIY = mpWindowImpl->mpFrameData->mnDPIY; // setup the scale factor for Hi-DPI displays mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); + const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings(); SetPointFont(*this, rStyleSettings.GetAppFont()); } else if ( mpWindowImpl->mpParent ) @@ -1355,25 +1351,16 @@ void Window::ImplInitResolutionSettings() void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const { Size aSize = rFont.GetFontSize(); - sal_uInt16 nScreenFontZoom; - if (!utl::ConfigManager::IsAvoidConfig()) - nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom(); - else - nScreenFontZoom = 100; if (aSize.Width()) { aSize.Width() *= mpWindowImpl->mpFrameData->mnDPIX; aSize.Width() += 72 / 2; aSize.Width() /= 72; - aSize.Width() *= nScreenFontZoom; - aSize.Width() /= 100; } aSize.Height() *= mpWindowImpl->mpFrameData->mnDPIY; aSize.Height() += 72/2; aSize.Height() /= 72; - aSize.Height() *= nScreenFontZoom; - aSize.Height() /= 100; if (rRenderContext.IsMapModeEnabled()) aSize = rRenderContext.PixelToLogic(aSize); @@ -1384,25 +1371,16 @@ void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFo void Window::ImplLogicToPoint(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const { Size aSize = rFont.GetFontSize(); - sal_uInt16 nScreenFontZoom; - if (!utl::ConfigManager::IsAvoidConfig()) - nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom(); - else - nScreenFontZoom = 100; if (rRenderContext.IsMapModeEnabled()) aSize = rRenderContext.LogicToPixel(aSize); if (aSize.Width()) { - aSize.Width() *= 100; - aSize.Width() /= nScreenFontZoom; aSize.Width() *= 72; aSize.Width() += mpWindowImpl->mpFrameData->mnDPIX / 2; aSize.Width() /= mpWindowImpl->mpFrameData->mnDPIX; } - aSize.Height() *= 100; - aSize.Height() /= nScreenFontZoom; aSize.Height() *= 72; aSize.Height() += mpWindowImpl->mpFrameData->mnDPIY / 2; aSize.Height() /= mpWindowImpl->mpFrameData->mnDPIY; |