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

Side by Side Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.cc

Issue 2763373002: Overlay scrollbars flush with window edge (Closed)
Patch Set: only flush 1 side Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ? "GtkScrollbar#scrollbar #contents #trough" 467 ? "GtkScrollbar#scrollbar #contents #trough"
468 : "GtkScrollbar.scrollbar.trough"), 468 : "GtkScrollbar.scrollbar.trough"),
469 BG_RENDER_NORMAL, true); 469 BG_RENDER_NORMAL, true);
470 } 470 }
471 471
472 void NativeThemeGtk3::PaintScrollbarThumb( 472 void NativeThemeGtk3::PaintScrollbarThumb(
473 cc::PaintCanvas* canvas, 473 cc::PaintCanvas* canvas,
474 Part part, 474 Part part,
475 State state, 475 State state,
476 const gfx::Rect& rect, 476 const gfx::Rect& rect,
477 NativeTheme::ScrollbarOverlayColorTheme theme) const { 477 const NativeTheme::ScrollbarThumbExtraParams&) const {
478 auto context = GetStyleContextFromCss( 478 auto context = GetStyleContextFromCss(
479 GtkVersionCheck(3, 20) 479 GtkVersionCheck(3, 20)
480 ? "GtkScrollbar#scrollbar #contents #trough #slider" 480 ? "GtkScrollbar#scrollbar #contents #trough #slider"
481 : "GtkScrollbar.scrollbar.slider"); 481 : "GtkScrollbar.scrollbar.slider");
482 gtk_style_context_set_state(context, StateToStateFlags(state)); 482 gtk_style_context_set_state(context, StateToStateFlags(state));
483 PaintWidget(canvas, rect, context, BG_RENDER_NORMAL, true); 483 PaintWidget(canvas, rect, context, BG_RENDER_NORMAL, true);
484 } 484 }
485 485
486 void NativeThemeGtk3::PaintScrollbarCorner(cc::PaintCanvas* canvas, 486 void NativeThemeGtk3::PaintScrollbarCorner(cc::PaintCanvas* canvas,
487 State state, 487 State state,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 if (frame_top_area.incognito) { 588 if (frame_top_area.incognito) {
589 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( 589 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap(
590 bitmap, kDefaultTintFrameIncognito); 590 bitmap, kDefaultTintFrameIncognito);
591 } 591 }
592 592
593 canvas->drawBitmap(bitmap, rect.x(), rect.y()); 593 canvas->drawBitmap(bitmap, rect.x(), rect.y());
594 } 594 }
595 595
596 } // namespace libgtkui 596 } // namespace libgtkui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698