Verified Commit 15056b99 authored by Felipe Kinoshita's avatar Felipe Kinoshita 🌎
Browse files

Prefer more common aspect ratios over correct math

Even though "43:18" or "683:384" are technically correct it's way
more common to see "21:9" and "16:9", so let's display the more
usual aspect ratios to the user.

BUG: 443764
parent fea22103
Pipeline #162697 passed with stage
in 4 minutes
......@@ -569,6 +569,10 @@ QVariantList OutputModel::resolutionsStrings(const KScreen::OutputPtr &output) c
divisor /= 2;
} else if (size.height() / divisor == 27) { // Prefer "21:9" over "64:27"
divisor *= 3;
} else if (size.height() / divisor == 18) { // Prefer "21:9" over "43:18"
divisor *= 2;
} else if (size.height() / divisor == 384) { // Prefer "16:9" over "683:384"
divisor *= 41;
}
const QString text = i18nc("Width x height (aspect ratio)",
......
Supports Markdown
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