OLD | NEW |
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/panels/panel_frame_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h" |
6 | 6 |
7 #include "chrome/browser/themes/theme_service.h" | 7 #include "chrome/browser/themes/theme_service.h" |
8 #include "chrome/browser/themes/theme_service_factory.h" | 8 #include "chrome/browser/themes/theme_service_factory.h" |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_constants.h" | 10 #include "chrome/browser/ui/panels/panel_constants.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 restore_button_->SetAccessibleName(tooltip_text); | 224 restore_button_->SetAccessibleName(tooltip_text); |
225 restore_button_->SetVisible(false); // only visible when panel is minimized | 225 restore_button_->SetVisible(false); // only visible when panel is minimized |
226 AddChildView(restore_button_); | 226 AddChildView(restore_button_); |
227 | 227 |
228 title_icon_ = new TabIconView(this); | 228 title_icon_ = new TabIconView(this); |
229 title_icon_->set_is_light(true); | 229 title_icon_->set_is_light(true); |
230 AddChildView(title_icon_); | 230 AddChildView(title_icon_); |
231 title_icon_->Update(); | 231 title_icon_->Update(); |
232 | 232 |
233 title_label_ = new views::Label(panel_view_->panel()->GetWindowTitle()); | 233 title_label_ = new views::Label(panel_view_->panel()->GetWindowTitle()); |
234 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 234 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
235 title_label_->SetAutoColorReadabilityEnabled(false); | 235 title_label_->SetAutoColorReadabilityEnabled(false); |
236 AddChildView(title_label_); | 236 AddChildView(title_label_); |
237 } | 237 } |
238 | 238 |
239 void PanelFrameView::UpdateTitle() { | 239 void PanelFrameView::UpdateTitle() { |
240 UpdateWindowTitle(); | 240 UpdateWindowTitle(); |
241 } | 241 } |
242 | 242 |
243 void PanelFrameView::UpdateIcon() { | 243 void PanelFrameView::UpdateIcon() { |
244 UpdateWindowIcon(); | 244 UpdateWindowIcon(); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 | 711 |
712 void PanelFrameView::PaintDivider(gfx::Canvas* canvas) { | 712 void PanelFrameView::PaintDivider(gfx::Canvas* canvas) { |
713 // Draw the divider between the titlebar and the client area only if the panel | 713 // Draw the divider between the titlebar and the client area only if the panel |
714 // is big enough to show more than the titlebar. | 714 // is big enough to show more than the titlebar. |
715 if (height() > TitlebarHeight()) { | 715 if (height() > TitlebarHeight()) { |
716 canvas->DrawLine(gfx::Point(0, panel::kTitlebarHeight - 1), | 716 canvas->DrawLine(gfx::Point(0, panel::kTitlebarHeight - 1), |
717 gfx::Point(width() - 1, panel::kTitlebarHeight - 1), | 717 gfx::Point(width() - 1, panel::kTitlebarHeight - 1), |
718 kDividerColor); | 718 kDividerColor); |
719 } | 719 } |
720 } | 720 } |
OLD | NEW |