32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
# HG changeset patch
|
|
# User Martin Stransky <stransky@redhat.com>
|
|
# Parent e0299ad29b855f798ee5db8257cbb459894c1b29
|
|
Bug 1144745 - scale border returned by GetWidgetBorder(), r=?karlt
|
|
|
|
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
|
|
--- a/widget/gtk/nsNativeThemeGTK.cpp
|
|
+++ b/widget/gtk/nsNativeThemeGTK.cpp
|
|
@@ -990,16 +990,22 @@ nsNativeThemeGTK::GetWidgetBorder(nsDevi
|
|
if (GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, nullptr,
|
|
nullptr)) {
|
|
moz_gtk_get_widget_border(gtkWidgetType, &aResult->left, &aResult->top,
|
|
&aResult->right, &aResult->bottom, direction,
|
|
IsFrameContentNodeInNamespace(aFrame, kNameSpaceID_XHTML));
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ gint scale = nsScreenGtk::GetGtkMonitorScaleFactor();
|
|
+ aResult->top *= scale;
|
|
+ aResult->right *= scale;
|
|
+ aResult->bottom *= scale;
|
|
+ aResult->left *= scale;
|
|
return NS_OK;
|
|
}
|
|
|
|
bool
|
|
nsNativeThemeGTK::GetWidgetPadding(nsDeviceContext* aContext,
|
|
nsIFrame* aFrame, uint8_t aWidgetType,
|
|
nsIntMargin* aResult)
|
|
{
|