зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439834 - Draw titlebar with some extent, r=dao
Some themes (Adwaita for instance) draws bold dark line at titlebar bottom. It does not fit well with Firefox tabbar UI so draw themed titlebar with some extent to make the titlebar bottom part invisible (it's clipped by cairo). MozReview-Commit-ID: 3rs4UzFJdPa --HG-- extra : rebase_source : ca9270f549a3106711afac8ee0c7a30839ab2bf3
This commit is contained in:
Родитель
64def92be1
Коммит
41ee718162
|
@ -2285,9 +2285,15 @@ moz_gtk_header_bar_paint(WidgetNodeType widgetType,
|
|||
GtkStyleContext *style = GetStyleContext(widgetType, GTK_TEXT_DIR_LTR,
|
||||
state_flags);
|
||||
InsetByMargin(rect, style);
|
||||
gtk_render_background(style, cr, rect->x, rect->y, rect->width,
|
||||
rect->height);
|
||||
gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
|
||||
|
||||
// Some themes (Adwaita for instance) draws bold dark line at
|
||||
// titlebar bottom. It does not fit well with Firefox tabs so
|
||||
// draw with some extent to make the titlebar bottom part invisible.
|
||||
#define TITLEBAR_EXTENT 4
|
||||
gtk_render_background(style, cr, rect->x, rect->y,
|
||||
rect->width, rect->height + TITLEBAR_EXTENT);
|
||||
gtk_render_frame(style, cr, rect->x, rect->y,
|
||||
rect->width, rect->height + TITLEBAR_EXTENT);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче