mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
move back layout settings
This commit is contained in:
parent
6c6cfe9a04
commit
0751d080eb
@ -41,9 +41,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-62</y>
|
||||
<y>0</y>
|
||||
<width>677</width>
|
||||
<height>640</height>
|
||||
<height>665</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
@ -54,6 +54,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_layout">
|
||||
<property name="text">
|
||||
<string>Vertical layout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_popup">
|
||||
<property name="text">
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user