mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 22:50:14 +03:00
improve badges borders colors
This commit is contained in:
parent
12e8863f4b
commit
13cb58d54a
@ -108,7 +108,7 @@ Loader{
|
||||
minimumWidth: 0.4 * (wrapper.zoomScale * root.iconSize)
|
||||
height: Math.max(24, 0.4 * (wrapper.zoomScale * root.iconSize))
|
||||
|
||||
border.color: root.minimizedDotColor
|
||||
borderColor: colorizerManager.originalLightTextColor
|
||||
proportion: 0
|
||||
radiusPerCentage: 100
|
||||
showNumber: false
|
||||
|
@ -34,6 +34,9 @@ Loader{
|
||||
|
||||
readonly property bool backgroundIsBusy: item ? item.isBusy : false
|
||||
|
||||
readonly property real originalThemeTextColorBrightness: ColorizerTools.colorBrightness(theme.textColor)
|
||||
readonly property color originalLightTextColor: originalThemeTextColorBrightness > 127.5 ? theme.textColor : theme.backgroundColor
|
||||
|
||||
readonly property real themeTextColorBrightness: ColorizerTools.colorBrightness(textColor)
|
||||
readonly property real backgroundColorBrightness: ColorizerTools.colorBrightness(backgroundColor)
|
||||
readonly property color minimizedDotColor: themeTextColorBrightness > 127.5 ? Qt.darker(textColor, 1.7) : Qt.lighter(textColor, 8)
|
||||
|
@ -51,8 +51,11 @@ Rectangle {
|
||||
|
||||
color: theme.backgroundColor
|
||||
radius: (radiusPerCentage / 100) * (height / 2)
|
||||
border.width: 1 //Math.max(1,width/64)
|
||||
border.width: 0 //Math.max(1,width/64)
|
||||
|
||||
property int borderWidth: 1
|
||||
property real borderOpacity: 1
|
||||
property color borderColor: theme.textColor
|
||||
property color textColor: theme.textColor
|
||||
property color highlightedColor: theme.buttonFocusColor
|
||||
|
||||
@ -80,8 +83,8 @@ Rectangle {
|
||||
// edge bleeding fix
|
||||
readonly property double filler: 0.01
|
||||
|
||||
width: parent.width - 2 * parent.border.width
|
||||
height: parent.height - 2 * parent.border.width
|
||||
width: parent.width - 2 * parent.borderWidth
|
||||
height: parent.height - 2 * parent.borderWidth
|
||||
opacity: proportion > 0 ? 1 : 0
|
||||
|
||||
anchors.centerIn: parent
|
||||
@ -150,12 +153,12 @@ Rectangle {
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: parent.border.width
|
||||
anchors.bottomMargin: parent.border.width
|
||||
anchors.leftMargin: parent.border.width
|
||||
anchors.rightMargin: parent.border.width
|
||||
anchors.topMargin: parent.borderWidth
|
||||
anchors.bottomMargin: parent.borderWidth
|
||||
anchors.leftMargin: parent.borderWidth
|
||||
anchors.rightMargin: parent.borderWidth
|
||||
color: "transparent"
|
||||
border.width: parent.border.width+1
|
||||
border.width: parent.borderWidth > 0 ? parent.borderWidth+1 : 0
|
||||
border.color: "black"
|
||||
radius: parent.radius
|
||||
opacity: 0.4
|
||||
@ -163,10 +166,11 @@ Rectangle {
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
border.width: parent.border.width
|
||||
border.color: parent.border.color
|
||||
border.width: parent.borderWidth
|
||||
border.color: parent.borderColor
|
||||
color: "transparent"
|
||||
radius: parent.radius
|
||||
opacity: parent.borderOpacity
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ import QtQuick 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
import org.kde.latte 0.2 as Latte
|
||||
import org.kde.latte.components 1.0 as LatteComponents
|
||||
|
||||
Item {
|
||||
id: background
|
||||
@ -52,22 +53,21 @@ Item {
|
||||
}
|
||||
]
|
||||
|
||||
Rectangle {
|
||||
LatteComponents.BadgeText {
|
||||
anchors.centerIn: parent
|
||||
width: 0.8 * parent.width
|
||||
height: width
|
||||
radius: width/2
|
||||
minimumWidth: width
|
||||
maximumWidth: width
|
||||
|
||||
fullCircle: true
|
||||
showNumber: false
|
||||
showText: true
|
||||
|
||||
color: theme.backgroundColor
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
border.width: 1
|
||||
border.color: root.minimizedDotColor
|
||||
radius: width/2
|
||||
|
||||
//opacity: taskItem.playingAudio && !taskItem.muted && taskItem.volume>0 ? 1 : 0.85
|
||||
}
|
||||
borderColor: root.lightTextColor
|
||||
proportion: 0
|
||||
radiusPerCentage: 100
|
||||
|
||||
Latte.IconItem{
|
||||
id: audioStreamIcon
|
||||
|
@ -59,7 +59,6 @@ Item {
|
||||
LatteComponents.BadgeText {
|
||||
id: progressCircle
|
||||
anchors.centerIn: parent
|
||||
border.color: textColor
|
||||
minimumWidth: Math.min(0.8 * parent.height, maximumWidth)
|
||||
maximumWidth: {
|
||||
if (showsAudioBadge) {
|
||||
@ -85,6 +84,7 @@ Item {
|
||||
|
||||
color: theme.backgroundColor
|
||||
textColor: showsInfoBadge ? root.lightTextColor : theme.textColor
|
||||
borderColor: root.lightTextColor
|
||||
|
||||
highlightedColor: {
|
||||
if (showsInfoBadge) {
|
||||
|
@ -58,7 +58,6 @@ Loader{
|
||||
|
||||
LatteComponents.BadgeText {
|
||||
id: taskNumber
|
||||
|
||||
// when iconSize < 48, height is always = 24, height / iconSize > 50%
|
||||
// we prefer center aligned badges to top-left aligned ones
|
||||
property bool centerInParent: root.iconSize < 48
|
||||
@ -69,8 +68,8 @@ Loader{
|
||||
minimumWidth: 0.4 * (wrapper.mScale * root.iconSize)
|
||||
height: Math.max(24, 0.4 * (wrapper.mScale * root.iconSize))
|
||||
|
||||
border.color: root.minimizedDotColor
|
||||
textValue: shorcutBadge.badgeString
|
||||
borderColor: root.lightTextColor
|
||||
|
||||
showNumber: false
|
||||
showText: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user