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

Unified Diff: chrome/browser/ui/views/device_chooser_content_view.cc

Issue 2627483003: Centering turn on Bluetooth message on the chooser (Closed)
Patch Set: added comment Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/device_chooser_content_view.cc
diff --git a/chrome/browser/ui/views/device_chooser_content_view.cc b/chrome/browser/ui/views/device_chooser_content_view.cc
index ea0e5684e80ab112a7cc46243c7e7e08e6a72329..a648edfd47386c7d66acc0b8e09fb64916f37733 100644
--- a/chrome/browser/ui/views/device_chooser_content_view.cc
+++ b/chrome/browser/ui/views/device_chooser_content_view.cc
@@ -106,8 +106,13 @@ void DeviceChooserContentView::Layout() {
throbber_->SetBounds((rect.width() - kThrobberDiameter) / 2,
(rect.height() - kThrobberDiameter) / 2,
kThrobberDiameter, kThrobberDiameter);
+ // Set the adapter off message in the center of the chooser.
+ // The adapter off message will only be shown when the adapter is off,
+ // and in that case, the system won't be able to scan for devices, so
+ // the throbber won't be shown at the same time.
turn_adapter_off_help_->SetPosition(
- gfx::Point(kAdapterOffHelpLinkPadding, kAdapterOffHelpLinkPadding));
+ gfx::Point((rect.width() - turn_adapter_off_help_->width()) / 2,
+ (rect.height() - turn_adapter_off_help_->height()) / 2));
turn_adapter_off_help_->SizeToFit(rect.width() -
2 * kAdapterOffHelpLinkPadding);
views::View::Layout();
« no previous file with comments | « chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698