Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0230b5f5 authored by Maxim Stepanov's avatar Maxim Stepanov Committed by Nate Graham

Added "Transparent with light text" theme for Desktop Notes

Summary:
This commit adds one more simple theme for Desktop Notes, for ones who prefer the dark background and want to put sticky notes on it.

BUG: 386833

Before:
{F6455193}

After:
{F6455194}

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: shubham, abetts, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17360
parent d36fba92
......@@ -54,7 +54,7 @@ QtLayouts.ColumnLayout {
cacheBuffer: 2000 // sometimes GridView gets confused and layouts items *somewhere*
cellWidth: Math.floor(notesView.viewport.width / 3)
cellHeight: cellWidth
model: ["white", "black", "red", "orange", "yellow", "green", "blue", "pink", "translucent"]
model: ["white", "black", "red", "orange", "yellow", "green", "blue", "pink", "translucent", "translucent-light"]
currentIndex: model.indexOf(cfg_color)
onCurrentIndexChanged: cfg_color = model[currentIndex]
......@@ -105,12 +105,13 @@ QtLayouts.ColumnLayout {
case "blue": return i18n("A blue sticky note")
case "pink": return i18n("A pink sticky note")
case "translucent": return i18n("A translucent sticky note")
case "translucent-light": return i18n("A translucent sticky note with light text")
}
}
//this is deliberately _NOT_ the theme color as we are over a known bright background
//an unknown colour over a known colour is a bad move as you end up with white on yellow
color: {
if (modelData === "black") {
if (modelData === "black" || modelData === "translucent-light") {
return "#dfdfdf"
} else {
return "#202020"
......
......@@ -174,7 +174,7 @@ PlasmaCore.SvgItem {
style: PlasmaStyle.TextAreaStyle {
//this is deliberately _NOT_ the theme color as we are over a known bright background
//an unknown colour over a known colour is a bad move as you end up with white on yellow
textColor: plasmoid.configuration.color === "black" ? "#dfdfdf" : "#202020"
textColor: (plasmoid.configuration.color === "black" || plasmoid.configuration.color === "translucent-light") ? "#dfdfdf" : "#202020"
}
//update the note if the source changes, but only if the user isn't editing it currently
......@@ -302,6 +302,7 @@ PlasmaCore.SvgItem {
plasmoid.setAction("change_note_color_blue", i18nc("@item:inmenu", "Blue"));
plasmoid.setAction("change_note_color_pink", i18nc("@item:inmenu", "Pink"));
plasmoid.setAction("change_note_color_translucent", i18nc("@item:inmenu", "Translucent"));
plasmoid.setAction("change_note_color_translucent-light", i18nc("@item:inmenu", "Translucent Light"));
plasmoid.setActionSeparator("separator0");
//plasmoid configuration doesn't check before emitting change signal
......
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