bar tooltips: use correct color, add subhead text

This commit is contained in:
end-4
2025-08-11 20:12:20 +07:00
parent 70a5520f47
commit 291b997972
7 changed files with 255 additions and 201 deletions
@@ -39,80 +39,6 @@ Item {
property string formattedUptime: DateTime.uptime
property string todosSection: getUpcomingTodos()
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
}
StyledPopup {
hoverTarget: mouseArea
contentComponent: Rectangle {
id: datePopup
readonly property real margin: 12
implicitWidth: columnLayout.implicitWidth + margin * 2
implicitHeight: columnLayout.implicitHeight + margin * 2
color: Appearance.colors.colTooltip
radius: Appearance.rounding.small
clip: true
ColumnLayout {
id: columnLayout
anchors.centerIn: parent
spacing: 8
// Date + Time row
RowLayout {
spacing: 5
Layout.fillWidth: true
StyledText {
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
color: Appearance.colors.colOnTooltip
text: `${root.formattedDate} ${root.formattedTime}`
}
}
// Uptime row
RowLayout {
spacing: 5
Layout.fillWidth: true
MaterialSymbol { text: "timelapse"; color: Appearance.colors.colOnTooltip }
StyledText { text: Translation.tr("System uptime:"); color: Appearance.colors.colOnTooltip }
StyledText {
Layout.fillWidth: true
horizontalAlignment: Text.AlignRight
color: Appearance.colors.colOnTooltip
text: root.formattedUptime
}
}
// Tasks
ColumnLayout {
spacing: 2
Layout.fillWidth: true
RowLayout {
spacing: 5
Layout.fillWidth: true
MaterialSymbol { text: "checklist"; color: Appearance.colors.colOnTooltip }
StyledText { text: Translation.tr("To Do:"); color: Appearance.colors.colOnTooltip }
}
StyledText {
Layout.fillWidth: true
topPadding: 5
horizontalAlignment: Text.AlignLeft
wrapMode: Text.Wrap
color: Appearance.colors.colOnTooltip
text: root.todosSection
}
}
}
}
}
RowLayout {
id: rowLayout
anchors.centerIn: parent
@@ -140,4 +66,84 @@ Item {
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
}
StyledPopup {
hoverTarget: mouseArea
contentComponent: Rectangle {
id: datePopup
readonly property real margin: 12
implicitWidth: columnLayout.implicitWidth + margin * 2
implicitHeight: columnLayout.implicitHeight + margin * 2
color: Appearance.colors.colSurfaceContainer
radius: Appearance.rounding.small
clip: true
ColumnLayout {
id: columnLayout
anchors.centerIn: parent
spacing: 4
// Date + Time row
RowLayout {
spacing: 5
MaterialSymbol {
fill: 0
font.weight: Font.Medium
text: "calendar_month"
iconSize: Appearance.font.pixelSize.large
color: Appearance.colors.colOnSurfaceVariant
}
StyledText {
horizontalAlignment: Text.AlignLeft
color: Appearance.colors.colOnSurfaceVariant
text: `${root.formattedDate} ${root.formattedTime}`
font.weight: Font.Medium
}
}
// Uptime row
RowLayout {
spacing: 5
Layout.fillWidth: true
MaterialSymbol { text: "timelapse"; color: Appearance.colors.colOnSurfaceVariant; font.pixelSize: Appearance.font.pixelSize.large }
StyledText { text: Translation.tr("System uptime:"); color: Appearance.colors.colOnSurfaceVariant }
StyledText {
Layout.fillWidth: true
horizontalAlignment: Text.AlignRight
color: Appearance.colors.colOnSurfaceVariant
text: root.formattedUptime
}
}
// Tasks
ColumnLayout {
spacing: 0
Layout.fillWidth: true
RowLayout {
spacing: 4
Layout.fillWidth: true
MaterialSymbol { text: "checklist"; color: Appearance.colors.colOnSurfaceVariant; font.pixelSize: Appearance.font.pixelSize.large }
StyledText { text: Translation.tr("To Do:"); color: Appearance.colors.colOnSurfaceVariant }
}
StyledText {
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
wrapMode: Text.Wrap
color: Appearance.colors.colOnSurfaceVariant
text: root.todosSection
}
}
}
}
}
}