summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/listdialog.ui104
-rw-r--r--src/mainwindow.cpp6
2 files changed, 50 insertions, 60 deletions
diff --git a/src/listdialog.ui b/src/listdialog.ui
index 032bc131..7aa3eba0 100644
--- a/src/listdialog.ui
+++ b/src/listdialog.ui
@@ -13,66 +13,50 @@
<property name="windowTitle">
<string>Select an item...</string>
</property>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>345</y>
- <width>240</width>
- <height>32</height>
- </rect>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- <widget class="QListWidget" name="choiceList">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>240</width>
- <height>300</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>240</width>
- <height>280</height>
- </size>
- </property>
- <property name="verticalScrollMode">
- <enum>QAbstractItemView::ScrollPerPixel</enum>
- </property>
- </widget>
- <widget class="MOBase::LineEditClear" name="filterEdit">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>320</y>
- <width>240</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="placeholderText">
- <string>Filter</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QListWidget" name="choiceList">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>240</width>
+ <height>280</height>
+ </size>
+ </property>
+ <property name="verticalScrollMode">
+ <enum>QAbstractItemView::ScrollPerPixel</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="MOBase::LineEditClear" name="filterEdit">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="placeholderText">
+ <string>Filter</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
<customwidgets>
<customwidget>
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 44fc0bf3..f68d9846 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -5716,7 +5716,12 @@ void MainWindow::sendSelectedModsToSeparator_clicked()
}
ListDialog dialog(this);
+ QSettings &settings = m_OrganizerCore.settings().directInterface();
+ QString key = QString("geometry/%1").arg(dialog.objectName());
+
+ dialog.setWindowTitle("Select a separator...");
dialog.setChoices(separators);
+ dialog.restoreGeometry(settings.value(key).toByteArray());
if (dialog.exec() == QDialog::Accepted) {
QString result = dialog.getChoice();
if (!result.isEmpty()) {
@@ -5750,4 +5755,5 @@ void MainWindow::sendSelectedModsToSeparator_clicked()
}
}
}
+ settings.setValue(key, dialog.saveGeometry());
}