Discussion:
[chromium-dev] Dialog buttons backwards
i***@chromium.org
2018-11-30 20:14:55 UTC
Permalink
I'm trying to set up a new confirmation dialog
in https://chromium-review.googlesource.com/c/chromium/src/+/1275292/13/chrome/browser/ui/views/crostini/crostini_app_uninstaller_view.cc,
and I notice the buttons seem backwards from some other similar dialogs.

The Files dialog has cancel and then delete:

[image: file delete confirm.png]

but my dialog looks a little different and has uninstall then cancel:

[image: uninstall confirm.png]

I'm not doing anything too fancy, just
overriding DialogModel::GetDialogButtons() to return ui::DIALOG_BUTTON_OK |
ui::DIALOG_BUTTON_CANCEL, and then overriding the OK button to have the
text "Uninstall".

Is there a setting somewhere I should change? Is this just an inconsistency
in the system? Is the Files delete dialog wrong?


This is on ChromeOS, but since the dialog code is all inside Chrome, I'm
asking on this list.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/6461498f-a33b-44c8-affb-a371c7e73481%40chromium.org.
Peter Kasting
2018-11-30 20:32:17 UTC
Permalink
I'm trying to set up a new confirmation dialog in
https://chromium-review.googlesource.com/c/chromium/src/+/1275292/13/chrome/browser/ui/views/crostini/crostini_app_uninstaller_view.cc,
and I notice the buttons seem backwards from some other similar dialogs.
[image: file delete confirm.png]
[image: uninstall confirm.png]
I'm not doing anything too fancy, just
overriding DialogModel::GetDialogButtons() to return ui::DIALOG_BUTTON_OK |
ui::DIALOG_BUTTON_CANCEL, and then overriding the OK button to have the
text "Uninstall".
Is there a setting somewhere I should change? Is this just an
inconsistency in the system? Is the Files delete dialog wrong?
From some brief code searching, I think that files dialog might be shown by
JS. It's quite possible it's wrong or this is inconsistent. In either
case, you're doing the right thing, and I wouldn't change course.

PK
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFD6KkTXF%3DVaSYTzGnOPt5Zj%2BiiK1xoxq00KXbbY%3DbHzRQ%40mail.gmail.com.
Lei Zhang
2018-11-30 21:44:01 UTC
Permalink
There's an effort to move the affirmative actions to the right side on
ChromeOS for consistency. e.g. https://crbug.com/844167 points to
https://goto.google.com/cros-button-order (sorry, Googlers only, but not
all that exciting.)
Post by Peter Kasting
I'm trying to set up a new confirmation dialog in
https://chromium-review.googlesource.com/c/chromium/src/+/1275292/13/chrome/browser/ui/views/crostini/crostini_app_uninstaller_view.cc,
and I notice the buttons seem backwards from some other similar dialogs.
[image: file delete confirm.png]
[image: uninstall confirm.png]
I'm not doing anything too fancy, just
overriding DialogModel::GetDialogButtons() to return ui::DIALOG_BUTTON_OK |
ui::DIALOG_BUTTON_CANCEL, and then overriding the OK button to have the
text "Uninstall".
Is there a setting somewhere I should change? Is this just an
inconsistency in the system? Is the Files delete dialog wrong?
From some brief code searching, I think that files dialog might be shown
by JS. It's quite possible it's wrong or this is inconsistent. In either
case, you're doing the right thing, and I wouldn't change course.
PK
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFD6KkTXF%3DVaSYTzGnOPt5Zj%2BiiK1xoxq00KXbbY%3DbHzRQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFD6KkTXF%3DVaSYTzGnOPt5Zj%2BiiK1xoxq00KXbbY%3DbHzRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACSHbcTuPTsmNV8-Jaoh%3DMUy4ZMJcBUDyjhF2cVsW3nci8oaaw%40mail.gmail.com.
Loading...