diff options
| author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-05-26 19:49:20 -0700 |
|---|---|---|
| committer | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-05-26 20:09:51 -0700 |
| commit | c004b59100811e786414fb155c2c907ae095f47a (patch) | |
| tree | e591d2f9567c1aed0e7bfd508144b6dd2afb0d83 /Source/Core/DolphinQt2/Config/ControllersWindow.cpp | |
| parent | aa33fabded3ad9300fed0e68c2596decefcd65e5 (diff) | |
DolphinQt2: replace icons with labels in controllers dialog
Icons without labels are bad for usability, so bring this back in line
with how DolphinWX does it.
Some reading:
- https://www.nngroup.com/articles/icon-usability/
> Summary: A user’s understanding of an icon is based on previous
> experience. Due to the absence of a standard usage for most icons,
> text labels are necessary to communicate the meaning and reduce
> ambiguity.
- http://uxmyths.com/post/715009009/myth-icons-enhance-usability
- http://edwardsanchez.me/blog/13589712
- https://uxdesign.cc/do-icons-need-labels-6cb4f4282c00
Diffstat (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index bda7b4fb0d..84490433f5 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -12,7 +12,6 @@ #include <QLabel> #include <QLineEdit> #include <QMessageBox> -#include <QPixmap> #include <QPushButton> #include <QRadioButton> #include <QSpacerItem> @@ -66,11 +65,7 @@ static int FromWiimoteMenuIndex(const int menudevice) return it->first; } -ControllersWindow::ControllersWindow(QWidget* parent) - : QDialog(parent), - m_configure_icon(Settings().GetThemeDir().append(QStringLiteral("config.png"))), - m_gamecube_icon(Settings().GetResourcesDir().append(QStringLiteral("Platform_Gamecube.png"))), - m_wii_icon(Settings().GetResourcesDir().append(QStringLiteral("Platform_Wii.png"))) +ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(parent) { setWindowTitle(tr("Controller Settings")); @@ -90,17 +85,13 @@ ControllersWindow::ControllersWindow(QWidget* parent) void ControllersWindow::CreateGamecubeLayout() { - m_gc_box = new QGroupBox(); + m_gc_box = new QGroupBox(tr("GameCube Controllers")); m_gc_layout = new QFormLayout(); - m_gc_label = new QLabel(); - m_gc_label->setPixmap(QPixmap(m_gamecube_icon)); - m_gc_label->setAlignment(Qt::AlignCenter); - m_gc_layout->addRow(m_gc_label); for (size_t i = 0; i < m_gc_groups.size(); i++) { auto* gc_box = m_gc_controller_boxes[i] = new QComboBox(); - auto* gc_button = m_gc_buttons[i] = new QPushButton(QIcon(m_configure_icon), QString()); + auto* gc_button = m_gc_buttons[i] = new QPushButton(tr("Configure")); auto* gc_group = m_gc_groups[i] = new QHBoxLayout(); gc_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); @@ -152,7 +143,7 @@ static QHBoxLayout* CreateSubItem(QWidget* label, QLayoutItem* item) void ControllersWindow::CreateWiimoteLayout() { - m_wiimote_box = new QGroupBox(); + m_wiimote_box = new QGroupBox(tr("Wii Remotes")); m_wiimote_layout = new QFormLayout(); m_wiimote_passthrough = new QRadioButton(tr("Use Bluetooth Passthrough")); m_wiimote_sync = new QPushButton(tr("Sync")); @@ -167,11 +158,6 @@ void ControllersWindow::CreateWiimoteLayout() m_wiimote_layout->setLabelAlignment(Qt::AlignLeft); - m_wii_label = new QLabel(); - m_wii_label->setPixmap(QPixmap(m_wii_icon)); - m_wii_label->setAlignment(Qt::AlignCenter); - m_wiimote_layout->addRow(m_wii_label); - // Passthrough BT m_wiimote_layout->addRow(m_wiimote_passthrough); @@ -190,7 +176,7 @@ void ControllersWindow::CreateWiimoteLayout() { auto* wm_label = m_wiimote_labels[i] = new QLabel(tr("Wii Remote %1").arg(i + 1)); auto* wm_box = m_wiimote_boxes[i] = new QComboBox(); - auto* wm_button = m_wiimote_buttons[i] = new QPushButton(QIcon(m_configure_icon), QString()); + auto* wm_button = m_wiimote_buttons[i] = new QPushButton(tr("Configure")); auto* wm_group = m_wiimote_groups[i] = new QHBoxLayout(); for (const auto& item : |
