mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1507423 - Don't draw StyleAppearance::MozWindowButtonBox on Linux/Gtk, r=mconley
Depends on D14243 Differential Revision: https://phabricator.services.mozilla.com/D14244 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8449b576c3
commit
36e0a3f5a9
@ -1092,6 +1092,18 @@ bool nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
nsNativeThemeGTK::IsWidgetVisible(StyleAppearance aAppearance)
|
||||
{
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::MozWindowButtonBox:
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNativeThemeGTK::DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
|
||||
StyleAppearance aAppearance,
|
||||
@ -1101,7 +1113,9 @@ nsNativeThemeGTK::DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
|
||||
WidgetNodeType gtkWidgetType;
|
||||
GtkTextDirection direction = GetTextDirection(aFrame);
|
||||
gint flags;
|
||||
if (!GetGtkWidgetAndState(aAppearance, aFrame, gtkWidgetType, &state,
|
||||
|
||||
if (!IsWidgetVisible(aAppearance) ||
|
||||
!GetGtkWidgetAndState(aAppearance, aFrame, gtkWidgetType, &state,
|
||||
&flags)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -90,6 +90,7 @@ class nsNativeThemeGTK final : private nsNativeTheme,
|
||||
GtkWidgetState* aState, gint* aWidgetFlags);
|
||||
bool GetExtraSizeForWidget(nsIFrame* aFrame, StyleAppearance aAppearance,
|
||||
nsIntMargin* aExtra);
|
||||
bool IsWidgetVisible(StyleAppearance aAppearance);
|
||||
|
||||
void RefreshWidgetWindow(nsIFrame* aFrame);
|
||||
WidgetNodeType NativeThemeToGtkTheme(StyleAppearance aAppearance,
|
||||
|
Loading…
Reference in New Issue
Block a user