diff --git a/sources/awesome-widget/advanced.ui b/sources/awesome-widget/advanced.ui
index 6030cd7..d38e420 100644
--- a/sources/awesome-widget/advanced.ui
+++ b/sources/awesome-widget/advanced.ui
@@ -41,9 +41,9 @@
0
- -62
+ 0
677
- 640
+ 665
@@ -54,6 +54,13 @@
+ -
+
+
+ Vertical layout
+
+
+
-
diff --git a/sources/awesome-widget/configuration.cpp b/sources/awesome-widget/configuration.cpp
index f451c79..24844cf 100644
--- a/sources/awesome-widget/configuration.cpp
+++ b/sources/awesome-widget/configuration.cpp
@@ -147,6 +147,10 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Unchecked);
else
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Checked);
+ if (configuration[QString("layout")].toInt() == 0)
+ uiAdvancedConfig.checkBox_layout->setCheckState(Qt::Unchecked);
+ else
+ uiAdvancedConfig.checkBox_layout->setCheckState(Qt::Checked);
if (configuration[QString("popup")].toInt() == 0)
uiAdvancedConfig.checkBox_popup->setCheckState(Qt::Unchecked);
else
@@ -400,6 +404,7 @@ void AwesomeWidget::configAccepted()
// advanced
cg.writeEntry("background", QString::number(uiAdvancedConfig.checkBox_background->checkState()));
+ cg.writeEntry("layout", QString::number(uiAdvancedConfig.checkBox_layout->checkState()));
cg.writeEntry("popup", QString::number(uiAdvancedConfig.checkBox_popup->checkState()));
cg.writeEntry("leftStretch", QString::number(uiAdvancedConfig.checkBox_leftStretch->checkState()));
cg.writeEntry("rightStretch", QString::number(uiAdvancedConfig.checkBox_rightStretch->checkState()));
@@ -497,6 +502,7 @@ void AwesomeWidget::configChanged()
// advanced
configuration[QString("background")] = cg.readEntry("background", "2");
+ configuration[QString("layout")] = cg.readEntry("layout", "2");
configuration[QString("popup")] = cg.readEntry("popup", "2");
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
diff --git a/sources/awesome-widget/reinit.cpp b/sources/awesome-widget/reinit.cpp
index 8096c52..1f4dff4 100644
--- a/sources/awesome-widget/reinit.cpp
+++ b/sources/awesome-widget/reinit.cpp
@@ -38,6 +38,10 @@ void AwesomeWidget::reinit()
mainLayout = new QGraphicsLinearLayout();
mainLayout->setContentsMargins(1, 1, 1, 1);
+ if (configuration[QString("layout")].toInt() == 0)
+ mainLayout->setOrientation(Qt::Horizontal);
+ else
+ mainLayout->setOrientation(Qt::Vertical);
setLayout(mainLayout);
if (configuration[QString("background")].toInt() == 0)