Files
86Box/src/qt/qt_util.hpp
Alexander Babikov 5de3af3df7 Manager: Fix style not reacting to Windows light/dark mode change
Add a native event filter for dark mode update, move the function
that queries the current theme to qt_util.cpp and make widgets
with custom stylesheets update their style on update
2025-08-23 20:10:41 +05:00

30 lines
745 B
C++

#ifndef QT_UTIL_HPP
#define QT_UTIL_HPP
#include <QString>
#include <QWidget>
#include <initializer_list>
class QScreen;
namespace util {
static constexpr auto UUID_MIN_LENGTH = 36;
/* Creates extension list for qt filedialog */
QString DlgFilter(std::initializer_list<QString> extensions, bool last = false);
QString DlgFilter(QStringList extensions, bool last = false);
/* Returns screen the widget is on */
QScreen *screenOfWidget(QWidget *widget);
#ifdef Q_OS_WINDOWS
bool isWindowsLightTheme(void);
void setWin11RoundedCorners(WId hwnd, bool enable);
#endif
QString currentUuid();
QString generateUuid(const QString &path);
void storeCurrentUuid();
bool compareUuid();
void generateNewMacAdresses();
bool hasConfiguredNICs();
};
#endif