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

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

Issue 2707313002: Gtk: Change NULL to nullptr (Closed)
Patch Set: Created 3 years, 10 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 }; 532 };
533 if (GtkVersionCheck(3, 20)) { 533 if (GtkVersionCheck(3, 20)) {
534 auto context = GetStyleContextFromCss( 534 auto context = GetStyleContextFromCss(
535 "GtkMenu#menu GtkSeparator#separator.horizontal"); 535 "GtkMenu#menu GtkSeparator#separator.horizontal");
536 GtkBorder margin, border, padding; 536 GtkBorder margin, border, padding;
537 GtkStateFlags state = gtk_style_context_get_state(context); 537 GtkStateFlags state = gtk_style_context_get_state(context);
538 gtk_style_context_get_margin(context, state, &margin); 538 gtk_style_context_get_margin(context, state, &margin);
539 gtk_style_context_get_border(context, state, &border); 539 gtk_style_context_get_border(context, state, &border);
540 gtk_style_context_get_padding(context, state, &padding); 540 gtk_style_context_get_padding(context, state, &padding);
541 int min_height = 1; 541 int min_height = 1;
542 gtk_style_context_get(context, state, "min-height", &min_height, NULL); 542 gtk_style_context_get(context, state, "min-height", &min_height, nullptr);
543 int w = rect.width() - margin.left - margin.right; 543 int w = rect.width() - margin.left - margin.right;
544 int h = std::max( 544 int h = std::max(
545 min_height + padding.top + padding.bottom + border.top + border.bottom, 545 min_height + padding.top + padding.bottom + border.top + border.bottom,
546 1); 546 1);
547 int x = margin.left; 547 int x = margin.left;
548 int y = separator_offset(h); 548 int y = separator_offset(h);
549 PaintWidget(canvas, gfx::Rect(x, y, w, h), context, BG_RENDER_NORMAL, true); 549 PaintWidget(canvas, gfx::Rect(x, y, w, h), context, BG_RENDER_NORMAL, true);
550 } else { 550 } else {
551 auto context = GetStyleContextFromCss( 551 auto context = GetStyleContextFromCss(
552 "GtkMenu#menu GtkMenuItem#menuitem.separator.horizontal"); 552 "GtkMenu#menu GtkMenuItem#menuitem.separator.horizontal");
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 591
592 if (frame_top_area.incognito) { 592 if (frame_top_area.incognito) {
593 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( 593 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap(
594 bitmap, kDefaultTintFrameIncognito); 594 bitmap, kDefaultTintFrameIncognito);
595 } 595 }
596 596
597 canvas->drawBitmap(bitmap, rect.x(), rect.y()); 597 canvas->drawBitmap(bitmap, rect.x(), rect.y());
598 } 598 }
599 599
600 } // namespace libgtkui 600 } // namespace libgtkui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk2.cc ('k') | chrome/browser/ui/libgtkui/print_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698