DolphinQt: Remove MappingButton bold/italic text indication.

This commit is contained in:
Jordan Woyak 2025-01-17 23:05:11 -06:00
parent d8cf835f07
commit ae72a781d4
3 changed files with 3 additions and 22 deletions

View File

@ -72,7 +72,7 @@ bool MappingButton::IsInput() const
return m_reference->IsInput();
}
MappingButton::MappingButton(MappingWidget* parent, ControlReference* ref, bool indicator)
MappingButton::MappingButton(MappingWidget* parent, ControlReference* ref)
: ElidedButton(RefToDisplayString(ref)), m_mapping_window(parent->GetParent()), m_reference(ref)
{
if (IsInput())
@ -87,9 +87,6 @@ MappingButton::MappingButton(MappingWidget* parent, ControlReference* ref, bool
connect(this, &MappingButton::clicked, this, &MappingButton::Clicked);
if (indicator)
connect(parent, &MappingWidget::Update, this, &MappingButton::UpdateIndicator);
connect(parent, &MappingWidget::ConfigChanged, this, &MappingButton::ConfigChanged);
connect(this, &MappingButton::ConfigChanged, [this] {
setText(RefToDisplayString(m_reference));
@ -134,21 +131,6 @@ void MappingButton::Clear()
m_mapping_window->UnQueueInputDetection(this);
}
void MappingButton::UpdateIndicator()
{
QFont f = m_mapping_window->font();
if (isActiveWindow() && m_reference->IsInput() && m_reference->GetState<bool>() && !m_is_mapping)
f.setBold(true);
// If the expression has failed to parse, show it in italic.
// Some expressions still work even the failed to parse so don't prevent the GetState() above.
if (m_reference->GetParseStatus() == ciface::ExpressionParser::ParseStatus::SyntaxError)
f.setItalic(true);
setFont(f);
}
void MappingButton::StartMapping()
{
// Focus just makes it more clear which button is currently being mapped.

View File

@ -15,7 +15,7 @@ class MappingButton : public ElidedButton
{
Q_OBJECT
public:
MappingButton(MappingWidget* widget, ControlReference* ref, bool indicator);
MappingButton(MappingWidget* widget, ControlReference* ref);
bool IsInput() const;
ControlReference* GetControlReference();
@ -26,7 +26,6 @@ signals:
private:
void Clear();
void UpdateIndicator();
void AdvancedPressed();
void Clicked();

View File

@ -313,7 +313,7 @@ QGroupBox* MappingWidget::CreateControlsBox(const QString& name, ControllerEmu::
void MappingWidget::CreateControl(const ControllerEmu::Control* control, QFormLayout* layout,
bool indicator)
{
auto* const button = new MappingButton(this, control->control_ref.get(), indicator);
auto* const button = new MappingButton(this, control->control_ref.get());
button->setMinimumWidth(100);
button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);