Commit 87f36f53 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[effects/startupfeedback] Fallback to small icon size when no cursor size is configured

As appears to be the case with the default setup...

BUG: 413605
FIXED-IN: 5.17.3

Differential Revision: https://phabricator.kde.org/D25065
parent c42a4234
......@@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QPainter>
// KDE
#include <KConfigGroup>
#include <KIconLoader>
#include <KSharedConfig>
#include <KStartupInfo>
#include <KSelectionOwner>
......@@ -284,7 +285,10 @@ void StartupFeedbackEffect::start(const QString& icon)
return cursorSize;
};
m_cursorSize = readCursorSize();
const int iconSize = m_cursorSize / 1.5;
int iconSize = m_cursorSize / 1.5;
if (!iconSize) {
iconSize = IconSize(KIconLoader::Small);
}
// get ratio for bouncing cursor so we don't need to manually calculate the sizes for each icon size
if (m_type == BouncingFeedback)
m_bounceSizesRatio = iconSize / 16.0;
......
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