Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit dfd178e6 authored by Your Name's avatar Your Name Committed by Aleix Pol Gonzalez

Show the preferred resolution on the combo box

Summary: Usually there's a preferred resoluton for a display, let the user know it

Test Plan: Used the kcm with it, it's shown.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: ngraham, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision:
parent be283983
......@@ -63,10 +63,13 @@ ResolutionSlider::ResolutionSlider(const KScreen::OutputPtr &output, QWidget *pa
Q_FOREACH (const QSize &size, mModes) {
if ((output->currentMode() && (output->currentMode()->size() == size))
|| (output->preferredMode() && (output->preferredMode()->size() == size))) {
mComboBox->setCurrentIndex(mComboBox->count() - 1);
const bool isCurrentMode = output->currentMode() && (output->currentMode()->size() == size);
const bool isPreferredMode = output->preferredMode() && (output->preferredMode()->size() == size);
const QIcon icon = isPreferredMode ? QIcon::fromTheme(QStringLiteral("favorite")) : QIcon();
mComboBox->addItem(icon, Utils::sizeToString(size));
if (isCurrentMode || isPreferredMode) {
mComboBox->setCurrentIndex(mComboBox->count() - 1);
layout->addWidget(mComboBox, 0, 0, 1, 1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment