From 14e1211f5c139b98d424ec039a5e92648e0a5990 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 16 Apr 2022 21:53:46 +0300 Subject: KMix: ported settings to TDEConfigXT/Designer This commit includes an improved Preferences dialog for KMix. It also exposes some previously hidden options and features, some of which experimental (build-time option, off by default). It also includes some minor UI improvements. Signed-off-by: Mavridis Philippe (cherry picked from commit 2cc6752c15371d87a0c8cf774515b0b44fc768d9) --- kmix/viewswitches.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'kmix/viewswitches.cpp') diff --git a/kmix/viewswitches.cpp b/kmix/viewswitches.cpp index 06b346e5..be364d55 100644 --- a/kmix/viewswitches.cpp +++ b/kmix/viewswitches.cpp @@ -36,19 +36,22 @@ ViewSwitches::ViewSwitches(TQWidget* parent, const char* name, const TQString & { // Create switch buttonGroup if ( _vflags & ViewBase::Vertical ) { - _layoutMDW = new TQVBoxLayout(this); - _layoutSwitch = new TQVBoxLayout(_layoutMDW); + _layoutMDW = new TQHBoxLayout(this); + _layoutSwitch = new TQHBoxLayout(_layoutMDW); _layoutEnum = new TQVBoxLayout(_layoutMDW); // always vertical! } else { - _layoutMDW = new TQHBoxLayout(this); - _layoutSwitch = new TQHBoxLayout(_layoutMDW); + _layoutMDW = new TQVBoxLayout(this); + _layoutSwitch = new TQVBoxLayout(_layoutMDW); // Place enums right from the switches: This is done, so that there will be no // ugly space on the left side, when no Switch is shown. // Actually it is not really clear yet, why there is empty space at all: There are 0 items in // the _layoutEnum, so it might be a sizeHint() or some other subtle layout issue. _layoutEnum = new TQVBoxLayout(_layoutMDW); - } + } + _layoutSwitch->setSpacing(10); + _layoutEnum->setSpacing(10); + _layoutMDW->setMargin(10); init(); } @@ -88,7 +91,7 @@ TQWidget* ViewSwitches::add(MixDevice *md) MixDeviceWidget *mdw; if ( md->isEnum() ) { - Qt::Orientation orientation = (_vflags & ViewBase::Vertical) ? Qt::Horizontal : Qt::Vertical; + TQt::Orientation orientation = (_vflags & ViewBase::Vertical) ? TQt::Vertical : TQt::Horizontal; mdw = new MDWEnum( _mixer, // the mixer for this device md, // MixDevice (parameter) @@ -101,7 +104,7 @@ TQWidget* ViewSwitches::add(MixDevice *md) } // an enum else { // must be a switch - Qt::Orientation orientation = (_vflags & ViewBase::Vertical) ? Qt::Horizontal : Qt::Vertical; + TQt::Orientation orientation = (_vflags & ViewBase::Vertical) ? TQt::Vertical : TQt::Horizontal; mdw = new MDWSwitch( _mixer, // the mixer for this device @@ -124,6 +127,9 @@ TQSize ViewSwitches::sizeHint() const { } void ViewSwitches::constructionFinished() { + if (_vflags & ViewBase::Horizontal) { + static_cast(_layoutMDW)->addStretch(); + } configurationUpdate(); // also does _layoutMDW->activate(); } -- cgit v1.2.1