diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2017-04-25 22:19:52 +0300 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2017-04-25 23:29:19 +0000 |
commit | 8b9f4364ba05c51ba4a0d8edcd53ea411824a590 (patch) | |
tree | e1a5b477f440ac7b9bbee18389c6c2642a5213fe | |
parent | 5a79be4df2e61c9c3bdef202c4d32771343f1c2a (diff) |
Material: use Android button layout for dialogs
It used macOS layout before, but now there is more appropriate layout
added to the QtGui.
[ChangeLog][Important Behavior Changes] DialogButtonBox with Material
theme now uses Android button layout.
Task-number: QTBUG-58060
Change-Id: I1caa56c532078e09c93c101ce5e6f562b7773c88
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | src/imports/controls/material/qquickmaterialtheme.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp index 3ea41779..f75fa8a5 100644 --- a/src/imports/controls/material/qquickmaterialtheme.cpp +++ b/src/imports/controls/material/qquickmaterialtheme.cpp @@ -110,14 +110,7 @@ QVariant QQuickMaterialTheme::themeHint(ThemeHint hint) const { switch (hint) { case QPlatformTheme::DialogButtonBoxLayout: - // https://material.io/guidelines/components/dialogs.html#dialogs-specs - // As per spec, affirmative actions are placed to the right, dismissive - // actions are placed directly to the left of affirmative actions. - // In the Android sources, there are additional type of actions - - // neutral, which are placed to the left. - // Rules for macOS seems to be the most suitable here and are also used - // in the Android QPA plugin. - return QVariant(QPlatformDialogHelper::MacLayout); + return QVariant(QPlatformDialogHelper::AndroidLayout); default: return QQuickProxyTheme::themeHint(hint); } |