Bug 1409493 - Add CSD entries to LookAndFeel, r?jhorak
MozReview-Commit-ID: Fc9sGpRrT1w
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -400,17 +400,41 @@ public:
eIntID_ScrollbarFadeBeginDelay,
eIntID_ScrollbarFadeDuration,
/**
* Distance in pixels to offset the context menu from the cursor
* on open.
*/
eIntID_ContextMenuOffsetVertical,
- eIntID_ContextMenuOffsetHorizontal
+ eIntID_ContextMenuOffsetHorizontal,
+
+ /*
+ * A boolean value indicating whether client-side decorations are
+ * supported by the user's GTK version.
+ */
+ eIntID_GTKCSDAvailable,
+
+ /*
+ * A boolean value indicating whether client-side decorations should
+ * contain a minimize button.
+ */
+ eIntID_GTKCSDMinimizeButton,
+
+ /*
+ * A boolean value indicating whether client-side decorations should
+ * contain a maximize button.
+ */
+ eIntID_GTKCSDMaximizeButton,
+
+ /*
+ * A boolean value indicating whether client-side decorations should
+ * contain a close button.
+ */
+ eIntID_GTKCSDCloseButton
};
/**
* Windows themes we currently detect.
*/
enum WindowsTheme {
eWindowsTheme_Generic = 0, // unrecognized theme
eWindowsTheme_Classic,
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -117,16 +117,28 @@ nsLookAndFeelIntPref nsXPLookAndFeel::sI
{ "ui.tooltipDelay",
eIntID_TooltipDelay,
false, 0 },
{ "ui.contextMenuOffsetVertical",
eIntID_ContextMenuOffsetVertical,
false, 0 },
{ "ui.contextMenuOffsetHorizontal",
eIntID_ContextMenuOffsetHorizontal,
+ false, 0 },
+ { "ui.GtkCSDAvailable",
+ eIntID_GTKCSDAvailable,
+ false, 0 },
+ { "ui.GtkCSDMinimizeButton",
+ eIntID_GTKCSDMinimizeButton,
+ false, 0 },
+ { "ui.GtkCSDMaximizeButton",
+ eIntID_GTKCSDMaximizeButton,
+ false, 0 },
+ { "ui.GtkCSDCloseButton",
+ eIntID_GTKCSDCloseButton,
false, 0 }
};
nsLookAndFeelFloatPref nsXPLookAndFeel::sFloatPrefs[] =
{
{ "ui.IMEUnderlineRelativeSize",
eFloatID_IMEUnderlineRelativeSize,
false, 0 },