summaryrefslogtreecommitdiffstats
path: root/kmix/viewswitches.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-04-16 21:53:46 +0300
committerMavridis Philippe <mavridisf@gmail.com>2023-06-22 18:11:18 +0300
commit14e1211f5c139b98d424ec039a5e92648e0a5990 (patch)
tree54a63dac6a5508912933592aec9a90b2289c34e1 /kmix/viewswitches.cpp
parent5d08ceabaf19206134b1bcd08c8642cdb0b41aa7 (diff)
downloadtdemultimedia-14e1211f5c139b98d424ec039a5e92648e0a5990.tar.gz
tdemultimedia-14e1211f5c139b98d424ec039a5e92648e0a5990.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> (cherry picked from commit 2cc6752c15371d87a0c8cf774515b0b44fc768d9)
Diffstat (limited to 'kmix/viewswitches.cpp')
-rw-r--r--kmix/viewswitches.cpp20
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();
}