launcher: fix light mode, group settings into resizable sections

This commit is contained in:
nmzik
2026-09-03 04:13:25 +02:00
parent e21c5f37d0
commit cd74809086
16 changed files with 494 additions and 422 deletions
@@ -10,6 +10,7 @@ class QByteArray;
class QGroupBox;
class QListWidget;
class QMoveEvent;
class QResizeEvent;
class QToolButton;
class QSettings;
class QWidget;
@@ -48,6 +49,7 @@ protected:
void AddGameDirectoryItem(const QString& dir);
void moveEvent(QMoveEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
static QByteArray g_last_geometry;
@@ -11,6 +11,7 @@
class ConfigurationItem;
class CompatibilityDatabase;
class QEvent;
class QTreeWidgetItem;
class QPoint;
class MainDialog;
@@ -52,6 +53,9 @@ signals:
void Run();
void Select();
protected:
void changeEvent(QEvent* event) override;
public slots:
void WriteSettings();
void ReadSettings();
@@ -74,6 +78,7 @@ private:
void ClearCustomSettings(ConfigurationItem* item);
void SelectItem(QTreeWidgetItem* witem);
void ApplyCompatibility();
void UpdateToolbarIcons();
[[nodiscard]] bool HasValidGameDirectory() const;
ConfigurationItem* m_selected_item = nullptr;
+3 -2
View File
@@ -1,7 +1,6 @@
#ifndef GAME_LIST_TREE_WIDGET_H
#define GAME_LIST_TREE_WIDGET_H
#include <QColor>
#include <QPaintEvent>
#include <QPainter>
#include <QPalette>
@@ -44,7 +43,9 @@ protected:
painter.fillRect(event->rect(), palette().brush(QPalette::Base));
} else {
painter.drawPixmap(m_scaled_pos, m_scaled);
painter.fillRect(event->rect(), QColor(0, 0, 0, 115));
auto overlay = palette().color(QPalette::Base);
overlay.setAlpha(185);
painter.fillRect(event->rect(), overlay);
}
}
+12
View File
@@ -0,0 +1,12 @@
#ifndef LAUNCHER_THEME_H
#define LAUNCHER_THEME_H
class QApplication;
namespace LauncherTheme {
void Initialize(QApplication& application);
} // namespace LauncherTheme
#endif // LAUNCHER_THEME_H