mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
launcher: fix light mode, group settings into resizable sections
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user