Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
commit
e237bd04ff
3 changed files with 13 additions and 12 deletions
|
|
@ -190,7 +190,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: ArchUpdaterService.updateInProgress ? "hourglass_empty" : "system_update"
|
icon: ArchUpdaterService.updateInProgress ? "hourglass_empty" : "filter_none"
|
||||||
tooltipText: ArchUpdaterService.updateInProgress ? "Update in progress..." : "Update all packages"
|
tooltipText: ArchUpdaterService.updateInProgress ? "Update in progress..." : "Update all packages"
|
||||||
enabled: !ArchUpdaterService.updateInProgress
|
enabled: !ArchUpdaterService.updateInProgress
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -203,7 +203,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: ArchUpdaterService.updateInProgress ? "hourglass_empty" : "settings"
|
icon: ArchUpdaterService.updateInProgress ? "hourglass_empty" : "check_box"
|
||||||
tooltipText: ArchUpdaterService.updateInProgress ? "Update in progress..." : "Update selected packages"
|
tooltipText: ArchUpdaterService.updateInProgress ? "Update in progress..." : "Update selected packages"
|
||||||
enabled: !ArchUpdaterService.updateInProgress && ArchUpdaterService.selectedPackagesCount > 0
|
enabled: !ArchUpdaterService.updateInProgress && ArchUpdaterService.selectedPackagesCount > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,11 @@ NIconButton {
|
||||||
|
|
||||||
// Icon states
|
// Icon states
|
||||||
icon: {
|
icon: {
|
||||||
if (ArchUpdaterService.busy || ArchUpdaterService.aurBusy)
|
if (ArchUpdaterService.busy || ArchUpdaterService.aurBusy) {
|
||||||
return "sync"
|
return "sync"
|
||||||
|
}
|
||||||
if (ArchUpdaterService.totalUpdates > 0) {
|
if (ArchUpdaterService.totalUpdates > 0) {
|
||||||
const count = ArchUpdaterService.totalUpdates
|
return "filter_none"
|
||||||
if (count > 50)
|
|
||||||
return "system_update_alt"
|
|
||||||
if (count > 10)
|
|
||||||
return "system_update"
|
|
||||||
return "system_update"
|
|
||||||
}
|
}
|
||||||
return "task_alt"
|
return "task_alt"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,12 @@ Item {
|
||||||
|
|
||||||
// Used to avoid opening the pill on Quickshell startup
|
// Used to avoid opening the pill on Quickshell startup
|
||||||
property bool firstVolumeReceived: false
|
property bool firstVolumeReceived: false
|
||||||
|
property int wheelAccumulator: 0
|
||||||
|
|
||||||
implicitWidth: pill.width
|
implicitWidth: pill.width
|
||||||
implicitHeight: pill.height
|
implicitHeight: pill.height
|
||||||
|
|
||||||
|
|
||||||
function getIcon() {
|
function getIcon() {
|
||||||
if (AudioService.muted) {
|
if (AudioService.muted) {
|
||||||
return "volume_off"
|
return "volume_off"
|
||||||
|
|
@ -59,10 +61,13 @@ Item {
|
||||||
tooltipText: "Volume: " + Math.round(
|
tooltipText: "Volume: " + Math.round(
|
||||||
AudioService.volume * 100) + "%\nLeft click for advanced settings.\nScroll up/down to change volume."
|
AudioService.volume * 100) + "%\nLeft click for advanced settings.\nScroll up/down to change volume."
|
||||||
|
|
||||||
onWheel: function (angle) {
|
onWheel: function (delta) {
|
||||||
if (angle > 0) {
|
wheelAccumulator += delta
|
||||||
|
if (wheelAccumulator >= 120) {
|
||||||
|
wheelAccumulator = 0
|
||||||
AudioService.increaseVolume()
|
AudioService.increaseVolume()
|
||||||
} else if (angle < 0) {
|
} else if (wheelAccumulator <= -120) {
|
||||||
|
wheelAccumulator = 0
|
||||||
AudioService.decreaseVolume()
|
AudioService.decreaseVolume()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue