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

Side by Side Diff: chrome/browser/ui/views/options/advanced_contents_view.cc

Issue 6334152: Clean up RTL methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/views/options/advanced_contents_view.h" 5 #include "chrome/browser/ui/views/options/advanced_contents_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <cryptuiapi.h> 9 #include <cryptuiapi.h>
10 #pragma comment(lib, "cryptui.lib") 10 #pragma comment(lib, "cryptui.lib")
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 void FileDisplayArea::Paint(gfx::Canvas* canvas) { 143 void FileDisplayArea::Paint(gfx::Canvas* canvas) {
144 HDC dc = canvas->BeginPlatformPaint(); 144 HDC dc = canvas->BeginPlatformPaint();
145 RECT rect = { 0, 0, width(), height() }; 145 RECT rect = { 0, 0, width(), height() };
146 gfx::NativeTheme::instance()->PaintTextField( 146 gfx::NativeTheme::instance()->PaintTextField(
147 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect, 147 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect,
148 skia::SkColorToCOLORREF(text_field_background_color_), true, true); 148 skia::SkColorToCOLORREF(text_field_background_color_), true, true);
149 canvas->EndPlatformPaint(); 149 canvas->EndPlatformPaint();
150 // Mirror left point for icon_bounds_ to draw icon in RTL locales correctly. 150 // Mirror left point for icon_bounds_ to draw icon in RTL locales correctly.
151 canvas->DrawBitmapInt(default_folder_icon_, 151 canvas->DrawBitmapInt(default_folder_icon_, GetMirroredXForRect(icon_bounds_),
152 MirroredLeftPointForRect(icon_bounds_),
153 icon_bounds_.y()); 152 icon_bounds_.y());
154 } 153 }
155 154
156 void FileDisplayArea::Layout() { 155 void FileDisplayArea::Layout() {
157 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing, 156 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing,
158 kFileIconSize, kFileIconSize); 157 kFileIconSize, kFileIconSize);
159 gfx::Size ps = text_field_->GetPreferredSize(); 158 gfx::Size ps = text_field_->GetPreferredSize();
160 text_field_->SetBounds(icon_bounds_.right() + kFileIconTextFieldSpacing, 159 text_field_->SetBounds(icon_bounds_.right() + kFileIconTextFieldSpacing,
161 (height() - ps.height()) / 2, 160 (height() - ps.height()) / 2,
162 width() - icon_bounds_.right() - 161 width() - icon_bounds_.right() -
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 // AdvancedScrollViewContainer, views::View overrides: 1636 // AdvancedScrollViewContainer, views::View overrides:
1638 1637
1639 void AdvancedScrollViewContainer::Layout() { 1638 void AdvancedScrollViewContainer::Layout() {
1640 gfx::Rect lb = GetLocalBounds(); 1639 gfx::Rect lb = GetLocalBounds();
1641 1640
1642 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( 1641 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize(
1643 gfx::NativeTheme::LIST); 1642 gfx::NativeTheme::LIST);
1644 lb.Inset(border.width(), border.height()); 1643 lb.Inset(border.width(), border.height());
1645 scroll_view_->SetBoundsRect(lb); 1644 scroll_view_->SetBoundsRect(lb);
1646 } 1645 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/keyword_hint_view.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698