Kaydet (Commit) 8aa57983 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Write HiDPI consistently without a hyphen

Hopefully makes it easier to find locations in the code related to
HiDPI issues.

Change-Id: I2b4e5ff6d66c0ca5792250c3fd0d42eeb59eb3ef
üst fde00c42
...@@ -38,7 +38,7 @@ static bool g_bLocalRendering(false); ...@@ -38,7 +38,7 @@ static bool g_bLocalRendering(false);
static LanguageTag g_aLanguageTag("en-US", true); static LanguageTag g_aLanguageTag("en-US", true);
/// Scaling of the cairo or CoreGraphics canvas painting for hi-dpi or zooming in Calc. /// Scaling of the cairo or CoreGraphics canvas painting for HiDPI or zooming in Calc.
static double g_fDPIScale(1.0); static double g_fDPIScale(1.0);
void setActive(bool bActive) void setActive(bool bActive)
......
...@@ -2332,7 +2332,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, ...@@ -2332,7 +2332,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS) #if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS)
// Painting of zoomed or hi-dpi spreadsheets is special, we actually draw everything at 100%, // Painting of zoomed or HiDPI spreadsheets is special, we actually draw everything at 100%,
// and only set cairo's (or CoreGraphic's, in the iOS case) scale factor accordingly, so that // and only set cairo's (or CoreGraphic's, in the iOS case) scale factor accordingly, so that
// everything is painted bigger or smaller. This is different to what Calc's internal scaling // everything is painted bigger or smaller. This is different to what Calc's internal scaling
// would do - because that one is trying to fit the lines between cells to integer multiples of // would do - because that one is trying to fit the lines between cells to integer multiples of
......
...@@ -554,7 +554,7 @@ static sal_Bool isHiDPI(struct splash* splash) ...@@ -554,7 +554,7 @@ static sal_Bool isHiDPI(struct splash* splash)
double nDPI; double nDPI;
/* /*
* GNOME currently enables hi-dpi support when the screen resolution is at least 192 dpi * GNOME currently enables HiDPI support when the screen resolution is at least 192 dpi
* and the screen height (in device pixels) is at least 1200. * and the screen height (in device pixels) is at least 1200.
*/ */
......
...@@ -59,9 +59,9 @@ COMPHELPER_DLLPUBLIC void setTiledPainting(bool bTiledPainting); ...@@ -59,9 +59,9 @@ COMPHELPER_DLLPUBLIC void setTiledPainting(bool bTiledPainting);
COMPHELPER_DLLPUBLIC bool isDialogPainting(); COMPHELPER_DLLPUBLIC bool isDialogPainting();
/// Set if we are painting the dialog. /// Set if we are painting the dialog.
COMPHELPER_DLLPUBLIC void setDialogPainting(bool bDialogPainting); COMPHELPER_DLLPUBLIC void setDialogPainting(bool bDialogPainting);
/// Set the DPI scale for rendering for hi-dpi displays. Used also for zoom in Calc. /// Set the DPI scale for rendering for HiDPI displays. Used also for zoom in Calc.
COMPHELPER_DLLPUBLIC void setDPIScale(double fDPIScale); COMPHELPER_DLLPUBLIC void setDPIScale(double fDPIScale);
/// Get the DPI scale for rendering for hi-dpi displays. Used also for zoom in Calc. /// Get the DPI scale for rendering for HiDPI displays. Used also for zoom in Calc.
COMPHELPER_DLLPUBLIC double getDPIScale(); COMPHELPER_DLLPUBLIC double getDPIScale();
/// Set if we want no annotations rendering /// Set if we want no annotations rendering
COMPHELPER_DLLPUBLIC void setTiledAnnotations(bool bTiledAnnotations); COMPHELPER_DLLPUBLIC void setTiledAnnotations(bool bTiledAnnotations);
......
...@@ -348,7 +348,7 @@ private: ...@@ -348,7 +348,7 @@ private:
long mnOutHeight; long mnOutHeight;
sal_Int32 mnDPIX; sal_Int32 mnDPIX;
sal_Int32 mnDPIY; sal_Int32 mnDPIY;
sal_Int32 mnDPIScalePercentage; ///< For Hi-DPI displays, we want to draw elements for a percentage larger sal_Int32 mnDPIScalePercentage; ///< For HiDPI displays, we want to draw elements for a percentage larger
/// font specific text alignment offsets in pixel units /// font specific text alignment offsets in pixel units
mutable long mnTextOffX; mutable long mnTextOffX;
mutable long mnTextOffY; mutable long mnTextOffY;
......
...@@ -917,7 +917,7 @@ static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI) ...@@ -917,7 +917,7 @@ static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
// insult to an injury, the system is constantly lying to us about // insult to an injury, the system is constantly lying to us about
// the DPI and whatnot // the DPI and whatnot
// eg. fdo#77059 - set the value from which we do consider the // eg. fdo#77059 - set the value from which we do consider the
// screen hi-dpi to greater than 168 // screen HiDPI to greater than 168
if (nDPI > 216) // 96 * 2 + 96 / 4 if (nDPI > 216) // 96 * 2 + 96 / 4
return 250; return 250;
else if (nDPI > 168) // 96 * 2 - 96 / 4 else if (nDPI > 168) // 96 * 2 - 96 / 4
...@@ -1129,7 +1129,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p ...@@ -1129,7 +1129,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
} }
// setup the scale factor for Hi-DPI displays // setup the scale factor for HiDPI displays
mnDPIScalePercentage = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); mnDPIScalePercentage = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
mnDPIX = mpWindowImpl->mpFrameData->mnDPIX; mnDPIX = mpWindowImpl->mpFrameData->mnDPIX;
mnDPIY = mpWindowImpl->mpFrameData->mnDPIY; mnDPIY = mpWindowImpl->mpFrameData->mnDPIY;
...@@ -1312,7 +1312,7 @@ void Window::ImplInitResolutionSettings() ...@@ -1312,7 +1312,7 @@ void Window::ImplInitResolutionSettings()
mnDPIX = mpWindowImpl->mpFrameData->mnDPIX; mnDPIX = mpWindowImpl->mpFrameData->mnDPIX;
mnDPIY = mpWindowImpl->mpFrameData->mnDPIY; mnDPIY = mpWindowImpl->mpFrameData->mnDPIY;
// setup the scale factor for Hi-DPI displays // setup the scale factor for HiDPI displays
mnDPIScalePercentage = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); mnDPIScalePercentage = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings(); const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
SetPointFont(*this, rStyleSettings.GetAppFont()); SetPointFont(*this, rStyleSettings.GetAppFont());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment