Fixes #46 - Battery and Volume percentage values are now rounded to the nearest whole rather than down. (#52)
This commit is contained in:
@@ -35,7 +35,7 @@ const Volume = () => {
|
||||
|
||||
const volPct = Widget.Label({
|
||||
vpack: "center",
|
||||
label: audio.speaker.bind("volume").as((v) => `${Math.floor(v * 100)}%`),
|
||||
label: audio.speaker.bind("volume").as((v) => `${Math.round(v * 100)}%`),
|
||||
class_name: "bar-button-label volume",
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user