MappingButton: derive from ElidedButton
This commit is contained in:
parent
b378ffb4ec
commit
046c6f468f
|
@ -17,7 +17,7 @@
|
|||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
MappingButton::MappingButton(MappingWidget* widget, ControlReference* ref)
|
||||
: QPushButton(QString::fromStdString(ref->expression)), m_parent(widget), m_reference(ref)
|
||||
: ElidedButton(QString::fromStdString(ref->expression)), m_parent(widget), m_reference(ref)
|
||||
{
|
||||
Connect();
|
||||
}
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <QPoint>
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
|
||||
#include "DolphinQt2/QtUtils/ElidedButton.h"
|
||||
|
||||
class ControlReference;
|
||||
class MappingWidget;
|
||||
class QEvent;
|
||||
class QMouseEvent;
|
||||
|
||||
class MappingButton : public QPushButton
|
||||
class MappingButton : public ElidedButton
|
||||
{
|
||||
public:
|
||||
MappingButton(MappingWidget* widget, ControlReference* ref);
|
||||
|
|
|
@ -49,6 +49,7 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
|
|||
for (auto& control : group->controls)
|
||||
{
|
||||
auto* button = new MappingButton(this, control->control_ref.get());
|
||||
button->setMinimumWidth(125);
|
||||
button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
form_layout->addRow(QString::fromStdString(control->name), button);
|
||||
m_buttons.push_back(button);
|
||||
|
|
Loading…
Reference in New Issue