1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-25 19:21:41 +03:00

option for prominent color of Notification Badges

--The user from Tasks,Badges can choose a more prominent
color for notification badges (usually reddish). In case
the user has not enabled that option(default) then the plasma
theme highlight color is used which is also the default
option of Latte v0.8

BUG: 408955
This commit is contained in:
Michail Vourlakos 2019-06-21 12:47:32 +03:00
parent 6c288401aa
commit df9394ddd6
7 changed files with 25 additions and 19 deletions

View File

@ -328,6 +328,9 @@
<entry name="audioBadgeActionsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="infoBadgeProminentColorEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="mouseWheelActions" type="Bool">
<default>true</default>
</entry>

View File

@ -436,6 +436,7 @@ Item {
property bool showProgressBadge: plasmoid.configuration.showProgressBadge
property bool showAudioBadge: plasmoid.configuration.showAudioBadge
property bool audioBadgeActionsEnabled: plasmoid.configuration.audioBadgeActionsEnabled
property bool infoBadgeProminentColorEnabled: plasmoid.configuration.infoBadgeProminentColorEnabled
property bool scrollTasksEnabled: plasmoid.configuration.scrollTasksEnabled
property bool autoScrollTasksEnabled: plasmoid.configuration.autoScrollTasksEnabled

View File

@ -178,6 +178,7 @@ Item {
property bool showInfoBadge: latteView ? latteView.showInfoBadge : plasmoid.configuration.showInfoBadge
property bool showProgressBadge: latteView ? latteView.showProgressBadge : plasmoid.configuration.showInfoBadge
property bool showAudioBadge: latteView ? latteView.showAudioBadge : plasmoid.configuration.showAudioBadge
property bool infoBadgeProminentColorEnabled: latteView ? latteView.infoBadgeProminentColorEnabled : false
property bool audioBadgeActionsEnabled: latteView ? latteView.audioBadgeActionsEnabled : true
property bool showOnlyCurrentScreen: latteView ? latteView.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: latteView ? latteView.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop

View File

@ -83,12 +83,18 @@ Item {
showNumber: true
color: theme.backgroundColor
textColor: showsInfoBadge ? root.lightTextColor : theme.textColor
textColor: {
if (showsInfoBadge) {
return root.infoBadgeProminentColorEnabled ? root.lightTextColor : theme.highlightedTextColor
}
return theme.textColor;
}
borderColor: root.lightTextColor
highlightedColor: {
if (showsInfoBadge) {
return theme.negativeTextColor
return root.infoBadgeProminentColorEnabled ? theme.negativeTextColor : theme.highlightColor
}
return theme.buttonFocusColor;

View File

@ -1006,11 +1006,5 @@ PlasmaComponents.Page {
}
}
//! END: Background
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer
text:" "
}
}
}

View File

@ -775,10 +775,5 @@ PlasmaComponents.Page {
}
//! END: Adjust
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer
text:" "
}
}
}

View File

@ -93,6 +93,18 @@ PlasmaComponents.Page {
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Prominent color for notification badge")
checked: plasmoid.configuration.infoBadgeProminentColorEnabled
enabled: plasmoid.configuration.showInfoBadge
tooltip: i18n("Notification badge uses a more prominent background which is usually red")
onClicked: {
plasmoid.configuration.infoBadgeProminentColorEnabled = !plasmoid.configuration.infoBadgeProminentColorEnabled;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Change volume when scrolling audio badge")
@ -615,11 +627,5 @@ PlasmaComponents.Page {
}
}
}
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer
text:" "
}
}
}