diff --git a/kcm/src/outputconfig.cpp b/kcm/src/outputconfig.cpp --- a/kcm/src/outputconfig.cpp +++ b/kcm/src/outputconfig.cpp @@ -84,6 +84,7 @@ connect(mOutput.data(), &KScreen::Output::scaleChanged, this, [=]() { + qDebug() << mOutput->scale(); const int index = mScale->findData(mOutput->scale()); mScale->setCurrentIndex(index); }); @@ -128,8 +129,20 @@ if (mShowScaleOption) { mScale = new QComboBox(this); - mScale->addItem(i18nc("Scale multiplier, show everything at 1 times normal scale", "1x"), 1); - mScale->addItem(i18nc("Scale multiplier, show everything at 2 times normal scale", "2x"), 2); + mScale->addItem(i18nc("Scale multiplier, show everything at normal scale", "1x"), 1.0); + + //FIXME #if Qt > 5.12 + //this is needed as without Qt having XDGOutput support when Plasma tries to full screen a window it will still have the wrong logical size and explode +//not added yet as Roman wanted to test and probably doesn't use dev. + //obviously it won't be merged as is. + mScale->addItem(i18nc("Scale multiplier, show everything at 125% normal scale", +"1.25x"), 1.25); + mScale->addItem(i18nc("Scale multiplier, show everything at 150% normal scale", +"1.5x"), 1.5); + mScale->addItem(i18nc("Scale multiplier, show everything at 175% normal scale", +"1.75x"), 1.75); + + mScale->addItem(i18nc("Scale multiplier, show everything at 200% normal scale", "2x"), 2.0); connect(mScale, static_cast(&QComboBox::activated), this, &OutputConfig::slotScaleChanged); mScale->setCurrentIndex(mScale->findData(mOutput->scale())); @@ -244,7 +257,7 @@ void OutputConfig::slotScaleChanged(int index) { - auto scale = mScale->itemData(index).toInt(); + auto scale = mScale->itemData(index).toDouble(); mOutput->setScale(scale); Q_EMIT changed(); }