Commit 864f3558 authored by Benjamin Port's avatar Benjamin Port

Set cursor size default to 24 to align with KCM

Reviewers: #plasma, meven, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T12040

Differential Revision: https://phabricator.kde.org/D28654
parent a2fc6f8e
......@@ -129,7 +129,7 @@ void Cursor::loadThemeFromKConfig()
{
KConfigGroup mousecfg(kwinApp()->inputConfig(), "Mouse");
const QString themeName = mousecfg.readEntry("cursorTheme", "default");
const uint themeSize = mousecfg.readEntry("cursorSize", 0);
const uint themeSize = mousecfg.readEntry("cursorSize", 24);
updateTheme(themeName, themeSize);
}
......
......@@ -80,7 +80,7 @@ StartupFeedbackEffect::StartupFeedbackEffect()
, m_texture(nullptr)
, m_type(BouncingFeedback)
, m_blinkingShader(nullptr)
, m_cursorSize(0)
, m_cursorSize(24)
, m_configWatcher(KConfigWatcher::create(KSharedConfig::openConfig("klaunchrc", KConfig::NoGlobals)))
{
for (int i = 0; i < 5; ++i) {
......@@ -278,13 +278,7 @@ void StartupFeedbackEffect::start(const QString& icon)
auto readCursorSize = []() -> int {
// read details about the mouse-cursor theme define per default
KConfigGroup mousecfg(effects->inputConfig(), "Mouse");
QString size = mousecfg.readEntry("cursorSize", QString());
// fetch a reasonable size for the cursor-theme image
bool ok;
int cursorSize = size.toInt(&ok);
if (!ok)
cursorSize = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
int cursorSize = mousecfg.readEntry("cursorSize", 24);
return cursorSize;
};
m_cursorSize = readCursorSize();
......
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