diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2022-04-16 21:53:46 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2023-06-22 15:18:13 +0300 |
commit | 2cc6752c15371d87a0c8cf774515b0b44fc768d9 (patch) | |
tree | 54a63dac6a5508912933592aec9a90b2289c34e1 /kmix/viewswitches.cpp | |
parent | 5d08ceabaf19206134b1bcd08c8642cdb0b41aa7 (diff) | |
download | tdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.tar.gz tdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.zip |
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 <mavridisf@gmail.com>
Diffstat (limited to 'kmix/viewswitches.cpp')
-rw-r--r-- | kmix/viewswitches.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
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<TQBoxLayout*>(_layoutMDW)->addStretch(); + } configurationUpdate(); // also does _layoutMDW->activate(); } |