зеркало из https://github.com/mozilla/pjs.git
Make DPI preference behave the same on OS/2 as on Unixes. r=mkaply sr=roc b=323964
This commit is contained in:
Родитель
e8c42514b1
Коммит
b38434e360
|
@ -573,16 +573,18 @@ nsDeviceContextOS2::SetDPI(PRInt32 aPrefDPI)
|
||||||
GFX (::DevQueryCaps(hdc, CAPS_HORIZONTAL_FONT_RES, 1, &OSVal), FALSE);
|
GFX (::DevQueryCaps(hdc, CAPS_HORIZONTAL_FONT_RES, 1, &OSVal), FALSE);
|
||||||
::WinReleasePS(ps);
|
::WinReleasePS(ps);
|
||||||
|
|
||||||
if (aPrefDPI == 0) {
|
if (aPrefDPI > 0) {
|
||||||
// If the pref is 0 use of OS value
|
|
||||||
mDpi = OSVal;
|
|
||||||
} else if (aPrefDPI > 0) {
|
|
||||||
// If there's a valid pref value for the logical resolution,
|
// If there's a valid pref value for the logical resolution,
|
||||||
// use it.
|
// use it.
|
||||||
mDpi = aPrefDPI;
|
mDpi = aPrefDPI;
|
||||||
|
} else if ((aPrefDPI == 0) || (OSVal > 96)) {
|
||||||
|
// Either if the pref is 0 (force use of OS value) or the OS
|
||||||
|
// value is bigger than 96, use the OS value.
|
||||||
|
mDpi = OSVal;
|
||||||
} else {
|
} else {
|
||||||
// if we couldn't get the pref or it's negative then use 120
|
// if we couldn't get the pref or it's negative, and the OS
|
||||||
mDpi = 120;
|
// value is under 96ppi, then use 96.
|
||||||
|
mDpi = 96;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pt2t = 72;
|
int pt2t = 72;
|
||||||
|
|
|
@ -1518,7 +1518,7 @@ pref("network.dns.disableIPv6", true);
|
||||||
#if XP_OS2
|
#if XP_OS2
|
||||||
|
|
||||||
pref("ui.key.menuAccessKeyFocuses", true);
|
pref("ui.key.menuAccessKeyFocuses", true);
|
||||||
pref("browser.display.screen_resolution", 0); // System setting
|
pref("browser.display.screen_resolution", -1); // max(96dpi, System setting)
|
||||||
|
|
||||||
/* Fonts only needs lists if we have a default that might not be available. */
|
/* Fonts only needs lists if we have a default that might not be available. */
|
||||||
/* Tms Rmn, Helv and Courier are ALWAYS available on OS/2 */
|
/* Tms Rmn, Helv and Courier are ALWAYS available on OS/2 */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче