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
master
Benjamin Port 2020-04-07 15:32:22 +02:00
parent a2fc6f8eda
commit 864f355870
2 changed files with 3 additions and 9 deletions

View File

@ -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);
}

View File

@ -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();