From e0c8fb0cdcb9c95e3efa60322c1733df0a965650 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 15 May 2026 15:02:25 -0400 Subject: Recording popup, level meters, UX polish - Recording tray icon opens popup (mics + active recording streams) - Recording stream level meters forward from parent source signal - RecordingTray subclass for single-click (no double-click needed) - Context menu Set Default Output/Input shows checkmark when active - Last DeviceWidget in each row hides its right separator - Popup horizontal layout, configurable content (output/mic/apps) - Single-click tray, right-click menu for Open Mixer - Desktop file, icon, CMake install rules - Window bring-to-front across workspaces (KWin::forceActiveWindow) Co-Authored-By: Claude Sonnet 4.6 --- src/ui/mixerwindow.cpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'src/ui/mixerwindow.cpp') diff --git a/src/ui/mixerwindow.cpp b/src/ui/mixerwindow.cpp index caa6af5..53113e6 100644 --- a/src/ui/mixerwindow.cpp +++ b/src/ui/mixerwindow.cpp @@ -1,5 +1,6 @@ #include "mixerwindow.h" #include "preferencesdlg.h" +#include "devicewidget.h" #include "../model/pulsemodel.h" #include @@ -20,6 +21,7 @@ #include #include #include +#include #include "tmixtray.h" #include "devicespage.h" #include @@ -202,6 +204,12 @@ bool MixerWindow::queryClose() } +void MixerWindow::bringToFront() +{ + show(); + KWin::forceActiveWindow( winId() ); +} + void MixerWindow::showAbout() { TDEAboutData about( @@ -224,6 +232,21 @@ MixerWindow::Tab &MixerWindow::tabForCategory( AudioDevice::Category cat ) return m_output; } +static void updateSeparators( TQHBoxLayout *layout ) +{ + TQLayoutIterator it = layout->iterator(); + DeviceWidget *last = 0; + while ( TQLayoutItem *item = it.current() ) { + DeviceWidget *dw = dynamic_cast( item->widget() ); + if ( dw ) { + if ( last ) last->setSeparatorVisible( true ); + last = dw; + } + ++it; + } + if ( last ) last->setSeparatorVisible( false ); +} + void MixerWindow::onDeviceAdded( AudioDevice *dev ) { if ( m_stack->id( m_stack->visibleWidget() ) == 1 ) { @@ -232,6 +255,7 @@ void MixerWindow::onDeviceAdded( AudioDevice *dev ) m_allCount++; w->show(); m_widgets.insert( dev, w ); + updateSeparators( m_allLayout ); } else { Tab &t = tabForCategory( dev->category() ); TQWidget *w = dev->createWidget( t.page ); @@ -239,6 +263,7 @@ void MixerWindow::onDeviceAdded( AudioDevice *dev ) t.count++; w->show(); m_widgets.insert( dev, w ); + updateSeparators( t.layout ); } } @@ -255,13 +280,17 @@ void MixerWindow::onDeviceRemoved( AudioDevice *dev ) if ( m_stack->id( m_stack->visibleWidget() ) == 1 ) { m_allLayout->remove( w ); m_allCount--; + m_widgets.remove( dev ); + delete w; + updateSeparators( m_allLayout ); } else { Tab &t = tabForCategory( dev->category() ); t.layout->remove( w ); t.count--; + m_widgets.remove( dev ); + delete w; + updateSeparators( t.layout ); } - m_widgets.remove( dev ); - delete w; } -- cgit v1.2.3