OLD | NEW |
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 "chrome/browser/views/first_run_search_engine_view.h" | 5 #include "chrome/browser/views/first_run_search_engine_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 void FirstRunSearchEngineView::SetupControls() { | 239 void FirstRunSearchEngineView::SetupControls() { |
240 using views::Background; | 240 using views::Background; |
241 using views::ImageView; | 241 using views::ImageView; |
242 using views::Label; | 242 using views::Label; |
243 using views::NativeButton; | 243 using views::NativeButton; |
244 | 244 |
245 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 245 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
246 background_image_ = new views::ImageView(); | 246 background_image_ = new views::ImageView(); |
247 background_image_->SetImage(rb.GetBitmapNamed(IDR_SEARCH_ENGINE_DIALOG_TOP)); | 247 if (text_direction_is_rtl_) { |
| 248 background_image_->SetImage(rb.GetBitmapNamed( |
| 249 IDR_SEARCH_ENGINE_DIALOG_TOP_RTL)); |
| 250 } else { |
| 251 background_image_->SetImage(rb.GetBitmapNamed( |
| 252 IDR_SEARCH_ENGINE_DIALOG_TOP)); |
| 253 } |
248 background_image_->SetHorizontalAlignment(ImageView::TRAILING); | 254 background_image_->SetHorizontalAlignment(ImageView::TRAILING); |
249 AddChildView(background_image_); | 255 AddChildView(background_image_); |
250 | 256 |
251 int label_width = GetPreferredSize().width() - 2 * kPanelHorizMargin; | 257 int label_width = GetPreferredSize().width() - 2 * kPanelHorizMargin; |
252 | 258 |
253 set_background(Background::CreateSolidBackground(SK_ColorWHITE)); | 259 set_background(Background::CreateSolidBackground(SK_ColorWHITE)); |
254 | 260 |
255 // Add title and text asking the user to choose a search engine: | 261 // Add title and text asking the user to choose a search engine: |
256 title_label_ = new Label(l10n_util::GetString( | 262 title_label_ = new Label(l10n_util::GetString( |
257 IDS_FR_SEARCH_MAIN_LABEL)); | 263 IDS_FR_SEARCH_MAIN_LABEL)); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 logo_padding; | 383 logo_padding; |
378 search_engine_choices_[3]->SetBounds(next_h_space, next_v_space, | 384 search_engine_choices_[3]->SetBounds(next_h_space, next_v_space, |
379 button_width, button_height); | 385 button_width, button_height); |
380 } | 386 } |
381 } // if (search_engine_choices.size() > 0) | 387 } // if (search_engine_choices.size() > 0) |
382 } | 388 } |
383 | 389 |
384 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { | 390 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { |
385 return l10n_util::GetString(IDS_FIRSTRUN_DLG_TITLE); | 391 return l10n_util::GetString(IDS_FIRSTRUN_DLG_TITLE); |
386 } | 392 } |
OLD | NEW |