зеркало из https://github.com/mozilla/gecko-dev.git
bug 861112 - (widget/gtk2) scaling from display to device pixels should only apply to top-level windows/dialogs/popups, not to child or plugin windows. r=roc
This commit is contained in:
Родитель
f38f1c6f87
Коммит
45d68b1f87
|
@ -995,7 +995,8 @@ nsWindow::Show(bool aState)
|
|||
NS_IMETHODIMP
|
||||
nsWindow::Resize(double aWidth, double aHeight, bool aRepaint)
|
||||
{
|
||||
double scale = GetDefaultScale();
|
||||
double scale =
|
||||
mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0;
|
||||
int32_t width = NSToIntRound(scale * aWidth);
|
||||
int32_t height = NSToIntRound(scale * aHeight);
|
||||
ConstrainSize(&width, &height);
|
||||
|
@ -1075,7 +1076,8 @@ NS_IMETHODIMP
|
|||
nsWindow::Resize(double aX, double aY, double aWidth, double aHeight,
|
||||
bool aRepaint)
|
||||
{
|
||||
double scale = GetDefaultScale();
|
||||
double scale =
|
||||
mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0;
|
||||
int32_t width = NSToIntRound(scale * aWidth);
|
||||
int32_t height = NSToIntRound(scale * aHeight);
|
||||
ConstrainSize(&width, &height);
|
||||
|
@ -1163,7 +1165,8 @@ nsWindow::Move(double aX, double aY)
|
|||
LOG(("nsWindow::Move [%p] %f %f\n", (void *)this,
|
||||
aX, aY));
|
||||
|
||||
double scale = GetDefaultScale();
|
||||
double scale =
|
||||
mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0;
|
||||
int32_t x = NSToIntRound(aX * scale);
|
||||
int32_t y = NSToIntRound(aY * scale);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче