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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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) 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/views/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 window_icon_->Update(); 170 window_icon_->Update();
171 } 171 }
172 172
173 window_title_ = new views::Label(browser_view->GetWindowTitle(), 173 window_title_ = new views::Label(browser_view->GetWindowTitle(),
174 BrowserFrame::GetTitleFont()); 174 BrowserFrame::GetTitleFont());
175 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); 175 window_title_->SetVisible(browser_view->ShouldShowWindowTitle());
176 window_title_->SetEnabledColor(SK_ColorWHITE); 176 window_title_->SetEnabledColor(SK_ColorWHITE);
177 // TODO(msw): Use a transparent background color as a workaround to use the 177 // TODO(msw): Use a transparent background color as a workaround to use the
178 // gfx::Canvas::NO_SUBPIXEL_RENDERING flag and avoid some visual artifacts. 178 // gfx::Canvas::NO_SUBPIXEL_RENDERING flag and avoid some visual artifacts.
179 window_title_->SetBackgroundColor(0x00000000); 179 window_title_->SetBackgroundColor(0x00000000);
180 window_title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 180 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
181 window_title_->SetElideBehavior(views::Label::ELIDE_AT_END); 181 window_title_->SetElideBehavior(views::Label::ELIDE_AT_END);
182 AddChildView(window_title_); 182 AddChildView(window_title_);
183 183
184 UpdateAvatarInfo(); 184 UpdateAvatarInfo();
185 if (!browser_view->IsOffTheRecord()) { 185 if (!browser_view->IsOffTheRecord()) {
186 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 186 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
187 content::NotificationService::AllSources()); 187 content::NotificationService::AllSources());
188 } 188 }
189 } 189 }
190 190
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, 1026 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
1027 int height) const { 1027 int height) const {
1028 int top_height = NonClientTopBorderHeight(false); 1028 int top_height = NonClientTopBorderHeight(false);
1029 int border_thickness = NonClientBorderThickness(); 1029 int border_thickness = NonClientBorderThickness();
1030 return gfx::Rect(border_thickness, top_height, 1030 return gfx::Rect(border_thickness, top_height,
1031 std::max(0, width - (2 * border_thickness)), 1031 std::max(0, width - (2 * border_thickness)),
1032 std::max(0, height - GetReservedHeight() - 1032 std::max(0, height - GetReservedHeight() -
1033 top_height - border_thickness)); 1033 top_height - border_thickness));
1034 } 1034 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/global_error_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698