mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 10:37:33 +09:00
[GTK3] Draw menuitem background even when not in hover
This commit is contained in:
parent
a47dfd1d82
commit
381de05df3
1 changed files with 20 additions and 24 deletions
|
|
@ -1826,10 +1826,8 @@ moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect,
|
||||||
{
|
{
|
||||||
gint x, y, w, h;
|
gint x, y, w, h;
|
||||||
|
|
||||||
if (state->inHover && !state->disabled) {
|
|
||||||
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
|
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
|
||||||
GtkStyleContext* style =
|
GtkStyleContext* style = ClaimStyleContext(widget, direction, state_flags);
|
||||||
ClaimStyleContext(widget, direction, state_flags);
|
|
||||||
|
|
||||||
bool pre_3_6 = gtk_check_version(3, 6, 0) != nullptr;
|
bool pre_3_6 = gtk_check_version(3, 6, 0) != nullptr;
|
||||||
if (pre_3_6) {
|
if (pre_3_6) {
|
||||||
|
|
@ -1840,7 +1838,6 @@ moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect,
|
||||||
if (widget == MOZ_GTK_MENUBARITEM) {
|
if (widget == MOZ_GTK_MENUBARITEM) {
|
||||||
gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR);
|
gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
x = rect->x;
|
x = rect->x;
|
||||||
y = rect->y;
|
y = rect->y;
|
||||||
|
|
@ -1854,7 +1851,6 @@ moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect,
|
||||||
gtk_style_context_restore(style);
|
gtk_style_context_restore(style);
|
||||||
}
|
}
|
||||||
ReleaseStyleContext(style);
|
ReleaseStyleContext(style);
|
||||||
}
|
|
||||||
|
|
||||||
return MOZ_GTK_SUCCESS;
|
return MOZ_GTK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue