A few small fixes

This commit is contained in:
Ly-sec 2025-07-28 13:17:30 +02:00
parent a36bc33123
commit a15677aadf
8 changed files with 35 additions and 20 deletions

View file

@ -21,10 +21,17 @@ Scope {
property var notificationHistoryWin: notificationHistoryWin
property bool pendingReload: false
// Helper function to round value to nearest step
function roundToStep(value, step) {
return Math.round(value / step) * step;
}
function updateVolume(vol) {
volume = vol;
var clamped = Math.max(0, Math.min(100, vol));
var stepped = roundToStep(clamped, 5);
volume = stepped;
if (defaultAudioSink && defaultAudioSink.audio) {
defaultAudioSink.audio.volume = vol / 100;
defaultAudioSink.audio.volume = stepped / 100;
}
}
@ -83,7 +90,6 @@ Scope {
barVisible: bar.visible
}
// Notification History Window
NotificationHistory {
id: notificationHistoryWin
}