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

Unified Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 2692403002: Put the new harmonized dialog implementation behind flag. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/options/network_config_view.cc
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index a5fd09df5384bcde278f522eece8b3ba8b47b040..923e95c70206711092299882c78c96405a260e7f 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -29,6 +29,7 @@
#include "ui/accessibility/ax_node_data.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image.h"
@@ -237,7 +238,9 @@ void NetworkConfigView::ShowAdvancedView() {
gfx::Size predefined_size = views::Widget::GetLocalizedContentsSize(
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_WIDTH_CHARS,
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_MINIMUM_HEIGHT_LINES);
- size.SetToMax(predefined_size);
+ // Use the pre-determined value to determine its size for non-harmony dialog.
+ if (!ui::MaterialDesignController::IsSecondaryUiMaterial())
+ size.SetToMax(predefined_size);
// Get the new bounds with desired size at the same center point.
gfx::Rect bounds = GetWidget()->GetWindowBoundsInScreen();

Powered by Google App Engine
This is Rietveld 408576698