Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d0626944
Kaydet (Commit)
d0626944
authored
Nis 08, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#77059, hidpi: Increase the threshold of what DPI we consider hi-dpi.
Change-Id: I79802df4c11b3543140672419d78b697848b7c36
üst
f6406c91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
window.cxx
vcl/source/window/window.cxx
+20
-10
No files found.
vcl/source/window/window.cxx
Dosyayı görüntüle @
d0626944
...
@@ -854,6 +854,23 @@ static bool ImplDoTiledRendering()
...
@@ -854,6 +854,23 @@ static bool ImplDoTiledRendering()
#endif
#endif
}
}
static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
{
sal_Int32 nResult = 1;
#ifndef MACOSX
// Setting of HiDPI is unfortunately all only a heuristic; and to add
// insult to an injury, the system is constantly lying to us about
// the DPI and whatnot
// eg. fdo#77059 - set the value from which we do consider the
// screen hi-dpi to greater than 168
if (nDPI > 168)
nResult = std::max(sal_Int32(1), (nDPI) / 96);
#endif
return nResult;
}
void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )
void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )
{
{
DBG_ASSERT( mpWindowImpl->mbFrame || pParent, "Window::Window(): pParent == NULL" );
DBG_ASSERT( mpWindowImpl->mbFrame || pParent, "Window::Window(): pParent == NULL" );
...
@@ -1108,11 +1125,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
...
@@ -1108,11 +1125,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
}
}
// setup the scale factor for Hi-DPI displays
// setup the scale factor for Hi-DPI displays
#ifdef MACOSX
mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
mnDPIScaleFactor = 1;
#else
mnDPIScaleFactor = std::max((sal_Int32)1, (mpWindowImpl->mpFrameData->mnDPIY + 48) / 96);
#endif
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
...
@@ -1810,11 +1824,7 @@ void Window::ImplInitResolutionSettings()
...
@@ -1810,11 +1824,7 @@ void Window::ImplInitResolutionSettings()
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
// setup the scale factor for Hi-DPI displays
// setup the scale factor for Hi-DPI displays
#ifdef MACOSX
mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
mnDPIScaleFactor = 1;
#else
mnDPIScaleFactor = std::max((sal_Int32)1, (mpWindowImpl->mpFrameData->mnDPIY + 48) / 96);
#endif
SetPointFont( rStyleSettings.GetAppFont() );
SetPointFont( rStyleSettings.GetAppFont() );
}
}
else if ( mpWindowImpl->mpParent )
else if ( mpWindowImpl->mpParent )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment