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

Side by Side Diff: trunk/src/chrome/browser/ui/libgtk2ui/gtk2_border.cc

Issue 188893003: Revert 255091 "linux_aura: Fix all instances of LabelButton sizing." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/libgtk2ui/gtk2_border.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 9 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
10 #include "third_party/skia/include/effects/SkLerpXfermode.h" 10 #include "third_party/skia/include/effects/SkLerpXfermode.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 PaintState(state, extra, rect, canvas); 113 PaintState(state, extra, rect, canvas);
114 canvas->sk_canvas()->restore(); 114 canvas->sk_canvas()->restore();
115 115
116 canvas->sk_canvas()->restore(); 116 canvas->sk_canvas()->restore();
117 } else { 117 } else {
118 PaintState(state, extra, rect, canvas); 118 PaintState(state, extra, rect, canvas);
119 } 119 }
120 } 120 }
121 121
122 gfx::Insets Gtk2Border::GetInsets() const { 122 gfx::Insets Gtk2Border::GetInsets() const {
123 return border_->GetInsets(); 123 ui::ThemeProvider* provider = owning_button_->GetThemeProvider();
124 if (!provider || !provider->UsingNativeTheme())
125 return border_->GetInsets();
126
127 return gtk2_ui_->GetButtonInsets();
124 } 128 }
125 129
126 gfx::Size Gtk2Border::GetMinimumSize() const { 130 gfx::Size Gtk2Border::GetMinimumSize() const {
127 ui::ThemeProvider* provider = owning_button_->GetThemeProvider(); 131 ui::ThemeProvider* provider = owning_button_->GetThemeProvider();
128 if (!provider || !provider->UsingNativeTheme()) 132 if (!provider || !provider->UsingNativeTheme())
129 return border_->GetMinimumSize(); 133 return border_->GetMinimumSize();
130 134
131 gfx::Insets insets = GetInsets(); 135 gfx::Insets insets = GetInsets();
132 return gfx::Size(insets.width(), insets.height()); 136 return gfx::Size(insets.width(), insets.height());
133 } 137 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return true; 175 return true;
172 } else if (owning_button_->style() == Button::STYLE_TEXTBUTTON) { 176 } else if (owning_button_->style() == Button::STYLE_TEXTBUTTON) {
173 return focused == false && (state == Button::STATE_HOVERED || 177 return focused == false && (state == Button::STATE_HOVERED ||
174 state == Button::STATE_PRESSED); 178 state == Button::STATE_PRESSED);
175 } 179 }
176 180
177 return false; 181 return false;
178 } 182 }
179 183
180 } // namespace libgtk2ui 184 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | trunk/src/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698