OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/libgtkui/native_theme_gtk3.h" | 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk3.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h" | 9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h" |
10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h" | 10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 ? "GtkScrollbar#scrollbar #contents #trough" | 473 ? "GtkScrollbar#scrollbar #contents #trough" |
474 : "GtkScrollbar.scrollbar.trough"), | 474 : "GtkScrollbar.scrollbar.trough"), |
475 BG_RENDER_NORMAL, true); | 475 BG_RENDER_NORMAL, true); |
476 } | 476 } |
477 | 477 |
478 void NativeThemeGtk3::PaintScrollbarThumb( | 478 void NativeThemeGtk3::PaintScrollbarThumb( |
479 cc::PaintCanvas* canvas, | 479 cc::PaintCanvas* canvas, |
480 Part part, | 480 Part part, |
481 State state, | 481 State state, |
482 const gfx::Rect& rect, | 482 const gfx::Rect& rect, |
483 NativeTheme::ScrollbarOverlayColorTheme theme) const { | 483 const NativeTheme::ScrollbarThumbExtraParams&) const { |
Evan Stade
2017/03/28 00:01:56
nit: we don't leave off the parameter name even wh
| |
484 auto context = GetStyleContextFromCss( | 484 auto context = GetStyleContextFromCss( |
485 GtkVersionCheck(3, 20) | 485 GtkVersionCheck(3, 20) |
486 ? "GtkScrollbar#scrollbar #contents #trough #slider" | 486 ? "GtkScrollbar#scrollbar #contents #trough #slider" |
487 : "GtkScrollbar.scrollbar.slider"); | 487 : "GtkScrollbar.scrollbar.slider"); |
488 gtk_style_context_set_state(context, StateToStateFlags(state)); | 488 gtk_style_context_set_state(context, StateToStateFlags(state)); |
489 PaintWidget(canvas, rect, context, BG_RENDER_NORMAL, true); | 489 PaintWidget(canvas, rect, context, BG_RENDER_NORMAL, true); |
490 } | 490 } |
491 | 491 |
492 void NativeThemeGtk3::PaintScrollbarCorner(cc::PaintCanvas* canvas, | 492 void NativeThemeGtk3::PaintScrollbarCorner(cc::PaintCanvas* canvas, |
493 State state, | 493 State state, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
593 | 593 |
594 if (frame_top_area.incognito) { | 594 if (frame_top_area.incognito) { |
595 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( | 595 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( |
596 bitmap, kDefaultTintFrameIncognito); | 596 bitmap, kDefaultTintFrameIncognito); |
597 } | 597 } |
598 | 598 |
599 canvas->drawBitmap(bitmap, rect.x(), rect.y()); | 599 canvas->drawBitmap(bitmap, rect.x(), rect.y()); |
600 } | 600 } |
601 | 601 |
602 } // namespace libgtkui | 602 } // namespace libgtkui |
OLD | NEW |