зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439857 - Fix too big fonts when devPixelsPerPx is set; r=stransky
This fixes regression introduced by hidpi support for wayland in case devPixelsPerPx is set (bug 1431337). MozReview-Commit-ID: DOh0aTcxbVG --HG-- extra : rebase_source : ac3ac449a99e0123b8a64ea36f25d312bb3c4483
This commit is contained in:
Родитель
db15906bed
Коммит
f77af604c8
|
@ -3,4 +3,4 @@ prefs =
|
|||
layout.css.devPixelsPerPx='2'
|
||||
|
||||
[../browser_startup_images.js]
|
||||
skip-if = !debug || ((os == 'win' && (os_version == '6.1')) || os == 'linux') # hidpi results in the toolbar overflowing on Win 7 and Linux
|
||||
skip-if = !debug || (os == 'win' && (os_version == '6.1')) # hidpi results in the toolbar overflowing on Win 7
|
||||
|
|
|
@ -790,7 +790,7 @@ nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName,
|
|||
// Scale the font for the current monitor
|
||||
double scaleFactor = nsIWidget::DefaultScaleOverride();
|
||||
if (scaleFactor > 0) {
|
||||
aFontStyle.size *= aDevPixPerCSSPixel;
|
||||
aFontStyle.size *= mozilla::widget::ScreenHelperGTK::GetGTKMonitorScaleFactor();
|
||||
} else {
|
||||
// Remove effect of font scale because it has been already applied in
|
||||
// GetSystemFontInfo
|
||||
|
|
|
@ -80,8 +80,8 @@ GetMonitorScaleFactor(nsIFrame* aFrame)
|
|||
return rootWidget->GetDefaultScale().scale / gfxPlatformGtk::GetFontScaleFactor();
|
||||
}
|
||||
}
|
||||
// We cannot return zero scale because that would lead to divide by zero
|
||||
return (scale < 1) ? 1 : int(round(scale));
|
||||
// Use monitor scaling factor where devPixelsPerPx is set
|
||||
return ScreenHelperGTK::GetGTKMonitorScaleFactor();
|
||||
}
|
||||
|
||||
nsNativeThemeGTK::nsNativeThemeGTK()
|
||||
|
|
Загрузка…
Ссылка в новой задаче