wbar: add updates indicator

This commit is contained in:
end-4
2025-11-15 21:30:28 +01:00
parent 6ee7212bdc
commit fdc38d69f7
13 changed files with 194 additions and 20 deletions
@@ -20,6 +20,7 @@ Singleton {
property real shadowTransparency: 0.6
colors: QtObject {
id: colors
property color ambientShadow: ColorUtils.transparentize("#000000", 0.4)
property color bg0: root.dark ? "#1C1C1C" : "#EEEEEE"
property color bg0Border: root.dark ? "#404040" : "#BEBEBE"
property color bg1: root.dark ? "#2C2C2C" : "#F7F7F7"
@@ -34,6 +35,7 @@ Singleton {
property color fg1: root.dark ? "#D1D1D1" : "#626262"
property color danger: "#C42B1C"
property color dangerActive: "#B62D1F"
property color warning: "#FF9900"
// property color accent: root.dark ? "#A5C6D8" : "#5377A3"
property color accent: Appearance.m3colors.m3primary
property color accentUnfocused: root.dark ? "#989898" : "#848484"
@@ -14,6 +14,7 @@ Button {
property color colBackground: ColorUtils.transparentize(Looks.colors.bg1)
property alias monochromeIcon: buttonIcon.monochrome
property bool forceShowIcon: false
property var altAction: () => {}
property var middleClickAction: () => {}
@@ -71,12 +72,12 @@ Button {
spacing: 12
FluentIcon {
id: buttonIcon
visible: root.icon.name !== "" || root.forceShowIcon
monochrome: true
implicitSize: 16
Layout.leftMargin: 6
Layout.fillWidth: false
Layout.alignment: Qt.AlignVCenter
visible: root.icon.name !== ""
icon: root.icon.name
}
WText {
@@ -10,14 +10,14 @@ import qs.modules.waffle.looks
PopupToolTip {
id: root
property real padding: 2
verticalPadding: padding
horizontalPadding: padding
property real visualMargin: 11
verticalPadding: visualMargin
horizontalPadding: visualMargin
contentItem: Item {
anchors.centerIn: parent
implicitWidth: realContent.implicitWidth + root.verticalPadding * 2
implicitHeight: realContent.implicitHeight + root.horizontalPadding * 2
implicitWidth: realContent.implicitWidth + 2 * 2
implicitHeight: realContent.implicitHeight + 2 * 2
Rectangle {
id: ambientShadow
@@ -26,7 +26,7 @@ PopupToolTip {
fill: realContent
margins: -border.width
}
border.color: ColorUtils.transparentize(Looks.colors.bg0Border, Looks.shadowTransparency)
border.color: ColorUtils.transparentize(Looks.colors.ambientShadow, Looks.shadowTransparency)
border.width: 1
color: "transparent"
radius: realContent.radius + border.width