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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 2628043002: Gtk3: Render a GtkHeaderBar as the background of the tab strip (Closed)
Patch Set: Guard kFrameTopArea with #if defined(OS_LINUX) && !defined(OS_CHROMEOS) Created 3 years, 11 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 | « ui/native_theme/native_theme_base.h ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index b9d2827db8961cd0c240bcf7c01f23fde6359027..ec5b30a6800a35197a7f5210787cb732e70118e2 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -172,6 +172,11 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
case kCheckbox:
PaintCheckbox(canvas, state, rect, extra.button);
break;
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ case kFrameTopArea:
+ PaintFrameTopArea(canvas, state, rect, extra.frame_top_area);
+ break;
+#endif
case kInnerSpinButton:
PaintInnerSpinButton(canvas, state, rect, extra.inner_spin);
break;
@@ -898,6 +903,16 @@ void NativeThemeBase::PaintProgressBar(
canvas->drawRect(gfx::RectFToSkRect(border_rect), stroke_paint);
}
+void NativeThemeBase::PaintFrameTopArea(
+ SkCanvas* canvas,
+ State state,
+ const gfx::Rect& rect,
+ const FrameTopAreaExtraParams& frame_top_area) const {
+ SkPaint paint;
+ paint.setColor(frame_top_area.default_background_color);
+ canvas->drawRect(gfx::RectToSkRect(rect), paint);
+}
+
void NativeThemeBase::AdjustCheckboxRadioRectForPadding(SkRect* rect) const {
// By default we only take 1px from right and bottom for the drop shadow.
rect->iset(rect->x(), rect->y(), rect->right() - 1, rect->bottom() - 1);
« no previous file with comments | « ui/native_theme/native_theme_base.h ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698