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

Side by Side Diff: views/controls/button/native_button_win.cc

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « views/controls/button/native_button_gtk.cc ('k') | views/controls/button/text_button.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/controls/button/native_button_win.h" 5 #include "views/controls/button/native_button_win.h"
6 6
7 #include <commctrl.h> 7 #include <commctrl.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win_util.h" 10 #include "base/win_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 Button_SetElevationRequiredState(native_view(), 42 Button_SetElevationRequiredState(native_view(),
43 native_button_->need_elevation()); 43 native_button_->need_elevation());
44 } 44 }
45 45
46 SetWindowText(native_view(), native_button_->label().c_str()); 46 SetWindowText(native_view(), native_button_->label().c_str());
47 button_size_valid_ = false; 47 button_size_valid_ = false;
48 } 48 }
49 49
50 void NativeButtonWin::UpdateFont() { 50 void NativeButtonWin::UpdateFont() {
51 SendMessage(native_view(), WM_SETFONT, 51 SendMessage(native_view(), WM_SETFONT,
52 reinterpret_cast<WPARAM>(native_button_->font().hfont()), 52 reinterpret_cast<WPARAM>(native_button_->font().GetNativeFont()),
53 FALSE); 53 FALSE);
54 button_size_valid_ = false; 54 button_size_valid_ = false;
55 } 55 }
56 56
57 void NativeButtonWin::UpdateEnabled() { 57 void NativeButtonWin::UpdateEnabled() {
58 SetEnabled(native_button_->IsEnabled()); 58 SetEnabled(native_button_->IsEnabled());
59 } 59 }
60 60
61 void NativeButtonWin::UpdateDefault() { 61 void NativeButtonWin::UpdateDefault() {
62 if (!IsCheckbox()) { 62 if (!IsCheckbox()) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return new NativeCheckboxWin(checkbox); 255 return new NativeCheckboxWin(checkbox);
256 } 256 }
257 257
258 // static 258 // static
259 NativeButtonWrapper* NativeButtonWrapper::CreateRadioButtonWrapper( 259 NativeButtonWrapper* NativeButtonWrapper::CreateRadioButtonWrapper(
260 RadioButton* radio_button) { 260 RadioButton* radio_button) {
261 return new NativeRadioButtonWin(radio_button); 261 return new NativeRadioButtonWin(radio_button);
262 } 262 }
263 263
264 } // namespace views 264 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/button/native_button_gtk.cc ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698