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); |