From 07b46a39886e582caad90d30aec44614dfff03fa Mon Sep 17 00:00:00 2001 From: redtide Date: Tue, 9 Apr 2024 10:32:08 +0200 Subject: [PATCH] Qt: replaced QTabWidget with QListWidget and QStackedWidget --- tweaks-qt/main.cpp | 7 +- tweaks-qt/maindialog.cpp | 2 + tweaks-qt/maindialog.ui | 275 ++++++++++++++++++++++++++------------- 3 files changed, 195 insertions(+), 89 deletions(-) diff --git a/tweaks-qt/main.cpp b/tweaks-qt/main.cpp index 3f69fa1..d422134 100644 --- a/tweaks-qt/main.cpp +++ b/tweaks-qt/main.cpp @@ -4,8 +4,11 @@ int main(int argc, char *argv[]) { - QApplication a(argc, argv); + QApplication app(argc, argv); + app.setApplicationName(QStringLiteral("labwc-tweaks")); + MainDialog w; w.show(); - return a.exec(); + + return app.exec(); } diff --git a/tweaks-qt/maindialog.cpp b/tweaks-qt/maindialog.cpp index 9a9d334..b9e7690 100644 --- a/tweaks-qt/maindialog.cpp +++ b/tweaks-qt/maindialog.cpp @@ -18,6 +18,8 @@ MainDialog::MainDialog(QWidget *parent) { ui->setupUi(this); + ui->list->setFixedWidth(ui->list->sizeHintForColumn(0) + 2 * ui->list->frameWidth()); + std::string config_file = std::getenv("HOME"); config_file += "/.config/labwc/rc.xml"; xml_init(config_file.data()); diff --git a/tweaks-qt/maindialog.ui b/tweaks-qt/maindialog.ui index d2815f7..b64f212 100644 --- a/tweaks-qt/maindialog.ui +++ b/tweaks-qt/maindialog.ui @@ -6,106 +6,191 @@ 0 0 - 658 - 535 + 640 + 480 - - Dialog - - + + + 6 + + + 6 + + + 6 + + + 6 + - - - - 640 - 480 - - - - 0 - - - - Appearance - - - - + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 0 + 0 + + + + QAbstractScrollArea::AdjustToContents + + + 0 + + - Corner Radius + Appearance - - - - - - Openbox Theme + + - - - - - - - - - - - - - Mouse && Touchpad - - - - + + - Cursor Theme + Mouse & Touchpad - - - - - - - - - Cursor Size + + - - - - - - - + + - Natural Scroll + Language & Region - - - - - - - - - - Language && Region - - - - - - Keyboard Layout + + + + + + + + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + Openbox Theme + + + + + + + + + + Corner Radius + + + + + + + - - - - - - + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + Cursor Theme + + + + + + + + + + Cursor Size + + + + + + + + + + Natural Scroll + + + + + + + + + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + Keyboard Layout + + + + + + + + + + + @@ -157,5 +242,21 @@ + + list + currentRowChanged(int) + stack + setCurrentIndex(int) + + + 145 + 248 + + + 459 + 248 + + +