Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Unified Diff: src/platform/theme/theme_draw.cc

Issue 1517028: More theme changes: (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/theme/resources/gtkrc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/theme/theme_draw.cc
diff --git a/src/platform/theme/theme_draw.cc b/src/platform/theme/theme_draw.cc
index a7e3d8efa8f3d075ca084ac90fa013a66352bc59..fabfe154c88f664ab395152ef760e97fbda75591 100644
--- a/src/platform/theme/theme_draw.cc
+++ b/src/platform/theme/theme_draw.cc
@@ -977,9 +977,6 @@ static void DrawTabBorder(GtkStyle* style,
}
cairo_translate(cr.get(), x, y);
- cairo_set_line_width(cr.get(), 1);
- cairo_set_source_rgb(cr.get(), TAB_PANE_BORDER_R, TAB_PANE_BORDER_G,
- TAB_PANE_BORDER_B);
cairo_move_to(cr.get(), .5, h);
cairo_line_to(cr.get(), .5, BORDER_CORNER_RADIUS);
@@ -994,6 +991,22 @@ static void DrawTabBorder(GtkStyle* style,
cairo_line_to(cr.get(), w - .5, BORDER_CORNER_RADIUS);
cairo_line_to(cr.get(), w - .5, h);
+ if (state_type != GTK_STATE_NORMAL) {
+ // Gradient background for inactive tabs.
+ cairo_path_t* save_path = cairo_copy_path(cr.get());
+
+ cairo_close_path(cr.get());
+ ScopedPattern pattern;
+ AddRoundRectGradient(cr.get(), &pattern, h, false);
+ cairo_fill(cr.get());
+
+ cairo_append_path(cr.get(), save_path);
+ cairo_path_destroy(save_path);
+ }
+
+ cairo_set_line_width(cr.get(), 1);
+ cairo_set_source_rgb(cr.get(), TAB_PANE_BORDER_R, TAB_PANE_BORDER_G,
+ TAB_PANE_BORDER_B);
cairo_stroke(cr.get());
}
@@ -1200,8 +1213,11 @@ void ThemeDrawArrow(GtkStyle* style,
} else if (GTK_IS_RANGE(widget)) {
DrawScrollbarArrow(style, window, state_type, shadow_type, area, widget,
arrow_type, fill, x, y, w, h);
- } else if (GTK_IS_MENU_ITEM(widget) && detail &&
- !strcmp(detail, "menuitem")) {
+ } else if ((GTK_IS_MENU_ITEM(widget) && detail &&
+ !strcmp(detail, "menuitem")) ||
+ (GTK_IS_MENU(widget) && detail &&
+ (!strcmp(detail, "menu_scroll_arrow_up") ||
+ !strcmp(detail, "menu_scroll_arrow_down")))) {
DrawMenuArrow(style, window, state_type, shadow_type, area, widget,
arrow_type, fill, x, y, w, h);
}
« no previous file with comments | « src/platform/theme/resources/gtkrc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698