diff --git a/kcm/src/widget.h b/kcm/src/widget.h --- a/kcm/src/widget.h +++ b/kcm/src/widget.h @@ -26,6 +26,7 @@ #include class ProfilesModel; +class QLabel; class QMLOutput; class QMLScreen; class ControlPanel; @@ -89,6 +90,7 @@ ProfilesModel *mProfilesModel = nullptr; PrimaryOutputCombo *mPrimaryCombo = nullptr; + QLabel *mPrimaryLabel = nullptr; QComboBox *mProfilesCombo = nullptr; QPushButton *mScaleAllOutputsButton = nullptr; diff --git a/kcm/src/widget.cpp b/kcm/src/widget.cpp --- a/kcm/src/widget.cpp +++ b/kcm/src/widget.cpp @@ -89,7 +89,8 @@ mPrimaryCombo = new PrimaryOutputCombo(this); connect(mPrimaryCombo, &PrimaryOutputCombo::changed, this, &Widget::changed); - hbox->addWidget(new QLabel(i18n("Primary display:"))); + mPrimaryLabel = new QLabel(i18n("Primary display:")); + hbox->addWidget(mPrimaryLabel); hbox->addWidget(mPrimaryCombo); hbox->addStretch(); @@ -176,7 +177,8 @@ mPrimaryCombo->setConfig(mConfig); mUnifyButton->setEnabled(mConfig->outputs().count() > 1); mScaleAllOutputsButton->setVisible(!mConfig->supportedFeatures().testFlag(KScreen::Config::Feature::PerOutputScaling)); - + mPrimaryCombo->setVisible(mConfig->supportedFeatures().testFlag(KScreen::Config::Feature::PrimaryDisplay)); + mPrimaryLabel->setVisible(mConfig->supportedFeatures().testFlag(KScreen::Config::Feature::PrimaryDisplay)); for (const KScreen::OutputPtr &output : mConfig->outputs()) { connect(output.data(), &KScreen::Output::isEnabledChanged,