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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 10832141: Fix bug 139829: Panels [Linux]: Dark titlebar theme only works with Classic theme, not with GTK+ th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/panels/panel_browser_window_gtk.h" 5 #include "chrome/browser/ui/panels/panel_browser_window_gtk.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 PanelBrowserTitlebarGtk* PanelBrowserWindowGtk::GetPanelTitlebar() const { 136 PanelBrowserTitlebarGtk* PanelBrowserWindowGtk::GetPanelTitlebar() const {
137 return static_cast<PanelBrowserTitlebarGtk*>(titlebar()); 137 return static_cast<PanelBrowserTitlebarGtk*>(titlebar());
138 } 138 }
139 139
140 bool PanelBrowserWindowGtk::UsingDefaultTheme() const { 140 bool PanelBrowserWindowGtk::UsingDefaultTheme() const {
141 // No theme is provided for attention painting. 141 // No theme is provided for attention painting.
142 if (paint_state_ == PAINT_FOR_ATTENTION) 142 if (paint_state_ == PAINT_FOR_ATTENTION)
143 return true; 143 return true;
144 144
145 GtkThemeService* theme_provider = GtkThemeService::GetFrom(panel_->profile()); 145 GtkThemeService* theme_provider = GtkThemeService::GetFrom(panel_->profile());
146 return theme_provider->UsingDefaultTheme(); 146 return theme_provider->UsingDefaultTheme() ||
147 theme_provider->UsingNativeTheme();
147 } 148 }
148 149
149 bool PanelBrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) { 150 bool PanelBrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) {
150 // Only detect the window edge when panels can be resized by the user. 151 // Only detect the window edge when panels can be resized by the user.
151 // This method is used by the base class to detect when the cursor has 152 // This method is used by the base class to detect when the cursor has
152 // hit the window edge in order to change the cursor to a resize cursor 153 // hit the window edge in order to change the cursor to a resize cursor
153 // and to detect when to initiate a resize drag. 154 // and to detect when to initiate a resize drag.
154 panel::Resizability resizability = panel_->CanResizeByMouse(); 155 panel::Resizability resizability = panel_->CanResizeByMouse();
155 if (panel::NOT_RESIZABLE == resizability) 156 if (panel::NOT_RESIZABLE == resizability)
156 return false; 157 return false;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 break; 759 break;
759 case panel::RESTORE_BUTTON: 760 case panel::RESTORE_BUTTON:
760 button = titlebar->restore_button(); 761 button = titlebar->restore_button();
761 break; 762 break;
762 default: 763 default:
763 NOTREACHED(); 764 NOTREACHED();
764 return false; 765 return false;
765 } 766 }
766 return gtk_widget_get_visible(button->widget()); 767 return gtk_widget_get_visible(button->widget());
767 } 768 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698