Fixed an issue that would cause the volume module to expand to the whole bar. (#508)

This commit is contained in:
Jas Singh
2024-11-15 01:59:34 -08:00
committed by GitHub
parent 33d756a9c1
commit 0c6a19ab89

View File

@@ -41,20 +41,17 @@ const Volume = (): BarBoxChild => {
}; };
const volIcn = Widget.Label({ const volIcn = Widget.Label({
hexpand: true,
label: getIcon(), label: getIcon(),
class_name: 'bar-button-icon volume txt-icon bar', class_name: 'bar-button-icon volume txt-icon bar',
}); });
const volPct = Widget.Label({ const volPct = Widget.Label({
hexpand: true,
label: audio.speaker.bind('volume').as((v) => `${Math.round(v * 100)}%`), label: audio.speaker.bind('volume').as((v) => `${Math.round(v * 100)}%`),
class_name: 'bar-button-label volume', class_name: 'bar-button-label volume',
}); });
return { return {
component: Widget.Box({ component: Widget.Box({
hexpand: true,
vexpand: true, vexpand: true,
tooltip_text: Utils.merge( tooltip_text: Utils.merge(
[audio.speaker.bind('description'), getIcon()], [audio.speaker.bind('description'), getIcon()],