Skip to content

Commit

Permalink
Fix tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbocanegra authored and bouteillerAlan committed Mar 2, 2024
1 parent 2faee3b commit 827d772
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
9 changes: 0 additions & 9 deletions a2n.archupdate.plasmoid/contents/ui/Compact.qml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,4 @@ Item {
}
}
}

Plasmoid.toolTipItem: Loader {
id: tooltipLoader
Layout.minimumWidth: item ? item.implicitWidth : 0
Layout.maximumWidth: item ? item.implicitWidth : 0
Layout.minimumHeight: item ? item.implicitHeight : 0
Layout.maximumHeight: item ? item.implicitHeight : 0
source: "Tooltip.qml"
}
}
4 changes: 2 additions & 2 deletions a2n.archupdate.plasmoid/contents/ui/Tooltip.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ ColumnLayout {
// property var usageNow;
property var dividerColor: Kirigami.Theme.textColor
property var dividerOpacity: 0.1
property string totalArch: row.totalArch
property string totalAur: row.totalAur
property string totalArch: main.totalArch
property string totalAur: main.totalAur

ColumnLayout {
id: mainLayout;
Expand Down
27 changes: 24 additions & 3 deletions a2n.archupdate.plasmoid/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@ import "../_toolbox" as Tb
import "../service" as Sv

PlasmoidItem {
id: archupdate
id: main

//preferredRepresentation: compactRepresentation
compactRepresentation: Compact {}
property string totalArch: "0"
property string totalAur: "0"

preferredRepresentation: compactRepresentation
compactRepresentation: Compact {

onTotalArchChanged: {
main.totalArch = totalArch
}
onTotalAurChanged: {
main.totalAur = totalAur
}
}
fullRepresentation: ColumnLayout {}

// load one instance of each needed service
Sv.Updater{ id: updater }
Expand All @@ -28,4 +40,13 @@ PlasmoidItem {
checker.konsole()
checker.checkupdates()
}

toolTipItem: Loader {
id: tooltipLoader
Layout.minimumWidth: item ? item.implicitWidth : 0
Layout.maximumWidth: item ? item.implicitWidth : 0
Layout.minimumHeight: item ? item.implicitHeight : 0
Layout.maximumHeight: item ? item.implicitHeight : 0
source: "Tooltip.qml"
}
}

0 comments on commit 827d772

Please sign in to comment.