OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/window/dialog_client_view.h" | 5 #include "views/window/dialog_client_view.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 const DialogClientView* DialogClientView::AsDialogClientView() const { | 305 const DialogClientView* DialogClientView::AsDialogClientView() const { |
306 return this; | 306 return this; |
307 } | 307 } |
308 | 308 |
309 //////////////////////////////////////////////////////////////////////////////// | 309 //////////////////////////////////////////////////////////////////////////////// |
310 // DialogClientView, View overrides: | 310 // DialogClientView, View overrides: |
311 | 311 |
312 void DialogClientView::OnPaint(gfx::Canvas* canvas) { | 312 void DialogClientView::OnPaint(gfx::Canvas* canvas) { |
313 #if defined(OS_WIN) | 313 #if defined(OS_WIN) |
314 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); | 314 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); |
| 315 #elif defined(USE_WAYLAND) |
| 316 SkColor sk_color = SkColorSetARGB(200, 255, 255, 255); |
| 317 canvas->FillRectInt(sk_color, 0, 0, width(), height()); |
315 #else | 318 #else |
316 GtkWidget* widget = GetWidget()->GetNativeView(); | 319 GtkWidget* widget = GetWidget()->GetNativeView(); |
317 if (GTK_IS_WINDOW(widget)) { | 320 if (GTK_IS_WINDOW(widget)) { |
318 GtkStyle* window_style = gtk_widget_get_style(widget); | 321 GtkStyle* window_style = gtk_widget_get_style(widget); |
319 canvas->FillRectInt(gfx::GdkColorToSkColor( | 322 canvas->FillRectInt(gfx::GdkColorToSkColor( |
320 window_style->bg[GTK_STATE_NORMAL]), | 323 window_style->bg[GTK_STATE_NORMAL]), |
321 0, 0, width(), height()); | 324 0, 0, width(), height()); |
322 } | 325 } |
323 #endif | 326 #endif |
324 } | 327 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 void DialogClientView::InitClass() { | 580 void DialogClientView::InitClass() { |
578 static bool initialized = false; | 581 static bool initialized = false; |
579 if (!initialized) { | 582 if (!initialized) { |
580 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 583 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
581 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); | 584 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); |
582 initialized = true; | 585 initialized = true; |
583 } | 586 } |
584 } | 587 } |
585 | 588 |
586 } // namespace views | 589 } // namespace views |
OLD | NEW |