mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Bug 1727289 - Prefer widget scale for scrollbar parts. r=mstange
Print preview documents might use a different DPI depending on the print target. Differential Revision: https://phabricator.services.mozilla.com/D123939
This commit is contained in:
parent
25a76b9440
commit
d1f5731c04
@ -342,6 +342,9 @@ static std::pair<sRGBColor, sRGBColor> SystemColorPair(
|
||||
/* static */
|
||||
auto nsNativeBasicTheme::GetDPIRatioForScrollbarPart(nsPresContext* aPc)
|
||||
-> DPIRatio {
|
||||
if (auto* widget = aPc->GetRootPresContext()->GetRootWidget()) {
|
||||
return widget->GetDefaultScale();
|
||||
}
|
||||
return DPIRatio(float(AppUnitsPerCSSPixel()) /
|
||||
aPc->DeviceContext()->AppUnitsPerDevPixelAtUnitFullZoom());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user