mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 02:36:27 +01:00
Merge pull request #5491 from ligfx/qtcontrollerremoveicons
DolphinQt2: replace icons in controllers dialog with labels
This commit is contained in:
commit
491b9d2a75
@ -12,7 +12,6 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
@ -66,11 +65,7 @@ static int FromWiimoteMenuIndex(const int menudevice)
|
|||||||
return it->first;
|
return it->first;
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllersWindow::ControllersWindow(QWidget* parent)
|
ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(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")))
|
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Controller Settings"));
|
setWindowTitle(tr("Controller Settings"));
|
||||||
|
|
||||||
@ -90,17 +85,13 @@ ControllersWindow::ControllersWindow(QWidget* parent)
|
|||||||
|
|
||||||
void ControllersWindow::CreateGamecubeLayout()
|
void ControllersWindow::CreateGamecubeLayout()
|
||||||
{
|
{
|
||||||
m_gc_box = new QGroupBox();
|
m_gc_box = new QGroupBox(tr("GameCube Controllers"));
|
||||||
m_gc_layout = new QFormLayout();
|
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++)
|
for (size_t i = 0; i < m_gc_groups.size(); i++)
|
||||||
{
|
{
|
||||||
auto* gc_box = m_gc_controller_boxes[i] = new QComboBox();
|
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();
|
auto* gc_group = m_gc_groups[i] = new QHBoxLayout();
|
||||||
|
|
||||||
gc_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
gc_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
@ -152,7 +143,7 @@ static QHBoxLayout* CreateSubItem(QWidget* label, QLayoutItem* item)
|
|||||||
|
|
||||||
void ControllersWindow::CreateWiimoteLayout()
|
void ControllersWindow::CreateWiimoteLayout()
|
||||||
{
|
{
|
||||||
m_wiimote_box = new QGroupBox();
|
m_wiimote_box = new QGroupBox(tr("Wii Remotes"));
|
||||||
m_wiimote_layout = new QFormLayout();
|
m_wiimote_layout = new QFormLayout();
|
||||||
m_wiimote_passthrough = new QRadioButton(tr("Use Bluetooth Passthrough"));
|
m_wiimote_passthrough = new QRadioButton(tr("Use Bluetooth Passthrough"));
|
||||||
m_wiimote_sync = new QPushButton(tr("Sync"));
|
m_wiimote_sync = new QPushButton(tr("Sync"));
|
||||||
@ -167,11 +158,6 @@ void ControllersWindow::CreateWiimoteLayout()
|
|||||||
|
|
||||||
m_wiimote_layout->setLabelAlignment(Qt::AlignLeft);
|
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
|
// Passthrough BT
|
||||||
|
|
||||||
m_wiimote_layout->addRow(m_wiimote_passthrough);
|
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_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_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();
|
auto* wm_group = m_wiimote_groups[i] = new QHBoxLayout();
|
||||||
|
|
||||||
for (const auto& item :
|
for (const auto& item :
|
||||||
|
@ -47,11 +47,6 @@ private:
|
|||||||
void ConnectWidgets();
|
void ConnectWidgets();
|
||||||
void LoadSettings();
|
void LoadSettings();
|
||||||
|
|
||||||
// Icons
|
|
||||||
QString m_configure_icon;
|
|
||||||
QString m_gamecube_icon;
|
|
||||||
QString m_wii_icon;
|
|
||||||
|
|
||||||
// Main
|
// Main
|
||||||
QVBoxLayout* m_main_layout;
|
QVBoxLayout* m_main_layout;
|
||||||
QDialogButtonBox* m_button_box;
|
QDialogButtonBox* m_button_box;
|
||||||
@ -59,7 +54,6 @@ private:
|
|||||||
// Gamecube
|
// Gamecube
|
||||||
std::array<MappingWindow*, 4> m_gc_mappings;
|
std::array<MappingWindow*, 4> m_gc_mappings;
|
||||||
QGroupBox* m_gc_box;
|
QGroupBox* m_gc_box;
|
||||||
QLabel* m_gc_label;
|
|
||||||
QFormLayout* m_gc_layout;
|
QFormLayout* m_gc_layout;
|
||||||
std::array<QComboBox*, 4> m_gc_controller_boxes;
|
std::array<QComboBox*, 4> m_gc_controller_boxes;
|
||||||
std::array<QPushButton*, 4> m_gc_buttons;
|
std::array<QPushButton*, 4> m_gc_buttons;
|
||||||
@ -68,7 +62,6 @@ private:
|
|||||||
// Wii Remote
|
// Wii Remote
|
||||||
std::array<MappingWindow*, 4> m_wiimote_mappings;
|
std::array<MappingWindow*, 4> m_wiimote_mappings;
|
||||||
QGroupBox* m_wiimote_box;
|
QGroupBox* m_wiimote_box;
|
||||||
QLabel* m_wii_label;
|
|
||||||
QFormLayout* m_wiimote_layout;
|
QFormLayout* m_wiimote_layout;
|
||||||
std::array<QLabel*, 4> m_wiimote_labels;
|
std::array<QLabel*, 4> m_wiimote_labels;
|
||||||
std::array<QComboBox*, 4> m_wiimote_boxes;
|
std::array<QComboBox*, 4> m_wiimote_boxes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user