mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
move back layout settings
This commit is contained in:
parent
6c6cfe9a04
commit
0751d080eb
@ -41,9 +41,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-62</y>
|
<y>0</y>
|
||||||
<width>677</width>
|
<width>677</width>
|
||||||
<height>640</height>
|
<height>665</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
@ -54,6 +54,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_layout">
|
||||||
|
<property name="text">
|
||||||
|
<string>Vertical layout</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_popup">
|
<widget class="QCheckBox" name="checkBox_popup">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -147,6 +147,10 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Unchecked);
|
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Unchecked);
|
||||||
else
|
else
|
||||||
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Checked);
|
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)
|
if (configuration[QString("popup")].toInt() == 0)
|
||||||
uiAdvancedConfig.checkBox_popup->setCheckState(Qt::Unchecked);
|
uiAdvancedConfig.checkBox_popup->setCheckState(Qt::Unchecked);
|
||||||
else
|
else
|
||||||
@ -400,6 +404,7 @@ void AwesomeWidget::configAccepted()
|
|||||||
|
|
||||||
// advanced
|
// advanced
|
||||||
cg.writeEntry("background", QString::number(uiAdvancedConfig.checkBox_background->checkState()));
|
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("popup", QString::number(uiAdvancedConfig.checkBox_popup->checkState()));
|
||||||
cg.writeEntry("leftStretch", QString::number(uiAdvancedConfig.checkBox_leftStretch->checkState()));
|
cg.writeEntry("leftStretch", QString::number(uiAdvancedConfig.checkBox_leftStretch->checkState()));
|
||||||
cg.writeEntry("rightStretch", QString::number(uiAdvancedConfig.checkBox_rightStretch->checkState()));
|
cg.writeEntry("rightStretch", QString::number(uiAdvancedConfig.checkBox_rightStretch->checkState()));
|
||||||
@ -497,6 +502,7 @@ void AwesomeWidget::configChanged()
|
|||||||
|
|
||||||
// advanced
|
// advanced
|
||||||
configuration[QString("background")] = cg.readEntry("background", "2");
|
configuration[QString("background")] = cg.readEntry("background", "2");
|
||||||
|
configuration[QString("layout")] = cg.readEntry("layout", "2");
|
||||||
configuration[QString("popup")] = cg.readEntry("popup", "2");
|
configuration[QString("popup")] = cg.readEntry("popup", "2");
|
||||||
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
|
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
|
||||||
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
|
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
|
||||||
|
@ -38,6 +38,10 @@ void AwesomeWidget::reinit()
|
|||||||
|
|
||||||
mainLayout = new QGraphicsLinearLayout();
|
mainLayout = new QGraphicsLinearLayout();
|
||||||
mainLayout->setContentsMargins(1, 1, 1, 1);
|
mainLayout->setContentsMargins(1, 1, 1, 1);
|
||||||
|
if (configuration[QString("layout")].toInt() == 0)
|
||||||
|
mainLayout->setOrientation(Qt::Horizontal);
|
||||||
|
else
|
||||||
|
mainLayout->setOrientation(Qt::Vertical);
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
if (configuration[QString("background")].toInt() == 0)
|
if (configuration[QString("background")].toInt() == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user