aboutsummaryrefslogtreecommitdiff
path: root/mingui
diff options
context:
space:
mode:
Diffstat (limited to 'mingui')
-rw-r--r--mingui/mingui.cpp10
-rw-r--r--mingui/mingui.hpp4
2 files changed, 9 insertions, 5 deletions
diff --git a/mingui/mingui.cpp b/mingui/mingui.cpp
index 8a9fa57..494745a 100644
--- a/mingui/mingui.cpp
+++ b/mingui/mingui.cpp
@@ -53,15 +53,15 @@ MinGuiWidget::MinGuiWidget()
this->setFont(QFontDatabase::systemFont(QFontDatabase::SystemFont::FixedFont));
this->setWindowTitle("deduper minigui");
this->setLayout(new QVBoxLayout(this));
- sb = new QStatusBar(this);
+ sb = this->statusBar();
sb->addPermanentWidget(permamsg = new QLabel());
QLabel *opm = new QLabel();
opm->setText("placeholder status bar text");
sb->addWidget(opm);
l = new QSplitter(Qt::Orientation::Horizontal, this);
+ l->setContentsMargins(6, 6, 6, 6);
l->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- this->layout()->addWidget(l);
- this->layout()->addWidget(sb);
+ this->setCentralWidget(l);
infopanel = new QTextEdit(this);
infopanel->setReadOnly(true);
infopanel->setMinimumWidth(80);
@@ -78,6 +78,9 @@ MinGuiWidget::MinGuiWidget()
lw->setResizeMode(QListView::ResizeMode::Adjust);
lw->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded);
lw->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded);
+ lw->setHorizontalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
+ lw->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
+ lw->setMinimumWidth(240);
for (size_t i = 0; i < keys.size(); ++i)
{
@@ -154,6 +157,7 @@ MinGuiWidget::MinGuiWidget()
l->addWidget(infopanel);
l->setStretchFactor(0, 3);
l->setStretchFactor(1, 1);
+ l->setCollapsible(0, false);
marked.clear();
infopanel->setText("bleh");
infopanel->setSizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum);
diff --git a/mingui/mingui.hpp b/mingui/mingui.hpp
index f0efda6..f80561b 100644
--- a/mingui/mingui.hpp
+++ b/mingui/mingui.hpp
@@ -6,7 +6,7 @@
#include <string>
#include <unordered_set>
-#include <QWidget>
+#include <QMainWindow>
#include <QList>
class QHBoxLayout;
@@ -21,7 +21,7 @@ class ImageItemDelegate;
namespace fs = std::filesystem;
-class MinGuiWidget : public QWidget
+class MinGuiWidget : public QMainWindow
{
Q_OBJECT
private: