From 120aa93813715351105b683a93cc3ea6a890db76 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 22 May 2026 12:07:16 -0400 Subject: fix volume percent length change from expanding overall width by setting itinitially to the full width. fixes resize bug reported by pitriss --- src/ui/alsa/alsadevicewidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/alsa/alsadevicewidget.cpp') diff --git a/src/ui/alsa/alsadevicewidget.cpp b/src/ui/alsa/alsadevicewidget.cpp index 214d931..6297640 100644 --- a/src/ui/alsa/alsadevicewidget.cpp +++ b/src/ui/alsa/alsadevicewidget.cpp @@ -99,7 +99,10 @@ AlsaDeviceWidget::AlsaDeviceWidget( AlsaDevice *dev, TQWidget *parent ) TQPixmap px = iconForDevice(dev); if ( !px.isNull() ) icon->setPixmap(px); topRow->addWidget(icon, 0, TQt::AlignVCenter); - m_volLabel = new TQLabel(TQString("%1%").arg(dev->volume()), this); + m_volLabel = new TQLabel("100%", this); + m_volLabel->setFixedWidth( m_volLabel->sizeHint().width() + 2 ); + m_volLabel->setAlignment( TQt::AlignRight | TQt::AlignVCenter ); + m_volLabel->setText( TQString("%1%").arg(dev->volume()) ); topRow->addWidget(m_volLabel, 0, TQt::AlignVCenter); col->addLayout(topRow); -- cgit v1.2.3