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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 2855623004: Don't allow Checkboxes to participate in equal-sized-buttons in Harmony dialogs. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | ui/views/window/dialog_client_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index 3cd043e2eb325ade6518cbbba973ce97210df3ad..12db11c2fd7229af3aa2b07e78cadfa74dd23ef6 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -392,8 +392,11 @@ void DialogClientView::SetupLayout() {
}
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
- // Only link the extra view column if it is a button.
- if (views[0] && !CustomButton::AsCustomButton(views[0]))
+ // Only link the extra view column if its View type matches the buttons. And
+ // if there's only buttons or only the extra view, everything can be linked.
+ View* either_button_view = ok_button_ ? ok_button_ : cancel_button_;
+ if (either_button_view && extra_view_ &&
msw 2017/05/02 17:20:10 nit: curlies for multi-line conditional?
tapted 2017/05/03 00:16:59 Broke out a separate bool - condition got a little
+ either_button_view->GetClassName() != extra_view_->GetClassName())
msw 2017/05/02 17:20:10 Won't this exclude other cases that we would want
tapted 2017/05/03 00:16:59 Done. I think, because this is only for Harmony,
msw 2017/05/03 18:21:01 Random dialogs might be using LabelButton for the
column_set->LinkColumnSizes(link[1], link[2], -1);
else
column_set->LinkColumnSizes(link[0], link[1], link[2], -1);
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698