This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change notification pop-up text size and color?

Tags: None
(comma "," separated)
apache
Registered Member
Posts
302
Karma
0
OS
How to change notification pop-up text size and color?
I am interested specifically in notifications that pop-up when song changes.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
apache wrote:How to change notification pop-up text size and color?
I am interested specifically in notifications that pop-up when song changes.



Plasma notifications are following the plasma theme or/and the plasma settings.

If you only want to change the plasma notification font - /usr/share/plasma/plasmoids/org.kde.plasma.notifications/

Code: Select all
$ grep -R font
contents/ui/NotificationIcon.qml:            font.pointSize: 100
contents/ui/NotificationIcon.qml:            fontSizeMode: Text.Fit
contents/ui/JobDetailsItem.qml:                font: theme.smallestFont
contents/ui/JobDetailsItem.qml:                font: theme.smallestFont
contents/ui/JobDetailsItem.qml:            font: theme.smallestFont
contents/ui/JobDetailsItem.qml:        font: theme.smallestFont
contents/ui/NotificationItem.qml:                    font.capitalization: theme.defaultFont.capitalization
contents/ui/NotificationItem.qml:                    font.family: theme.defaultFont.family
contents/ui/NotificationItem.qml:                    font.italic: theme.defaultFont.italic
contents/ui/NotificationItem.qml:                    font.letterSpacing: theme.defaultFont.letterSpacing
contents/ui/NotificationItem.qml:                    font.pointSize: theme.defaultFont.pointSize
contents/ui/NotificationItem.qml:                    font.strikeout: theme.defaultFont.strikeout
contents/ui/NotificationItem.qml:                    font.underline: theme.defaultFont.underline
contents/ui/NotificationItem.qml:                    font.weight: theme.defaultFont.weight
contents/ui/NotificationItem.qml:                    font.wordSpacing: theme.defaultFont.wordSpacing
contents/ui/ThumbnailStrip.qml:                font.pointSize: theme.smallestFont.pointSize


Code: Select all
$ grep -R textColor
contents/ui/NotificationItem.qml:                    color: PlasmaCore.ColorScope.textColor
contents/ui/ThumbnailStrip.qml:            color: theme.textColor


Editing the NotificationItem.qml

Image
Image
Image


A bit better way is to copy the scripts to the user's home and rename the plasmoids(/metadata.desktop and metadata.json).

KDE: https://techbase.kde.org/Development/Tu ... ingStarted

Qt/Qml:
- http://doc.qt.io/qt-5/
- https://doc.qt.io/qt-5/qtqml-index.html


More examples of plasma customization:
- viewtopic.php?f=289&t=131951
- viewtopic.php?f=17&t=131914
- viewtopic.php?f=17&t=140979
- viewtopic.php?f=17&t=134970&p=361132#p361132
apache
Registered Member
Posts
302
Karma
0
OS
Bug request to change text size and color for a new version of notifications:
Bug 411314 - Allow to change notification font size and color in configuration file.
https://bugs.kde.org/show_bug.cgi?id=411314


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]