summaryrefslogtreecommitdiffstats
path: root/kmix/viewswitches.cpp
diff options
context:
space:
mode:
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();
}