mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-06-30 16:43:31 +00:00
UI: Enforce completely Fusion Qt style on Linux
As of 8dcfae9a39
, indicating the base
style to the proxy is completely functional.
It also bypasses QT_STYLE_OVERRIDE and -style, but since the system
theme is no longer available on Linux this is a non-issue.
This commit is contained in:
parent
76bde59e22
commit
34d577d748
|
@ -930,7 +930,11 @@ static map<string, string> themeMigrations = {
|
|||
bool OBSApp::InitTheme()
|
||||
{
|
||||
defaultPalette = palette();
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
setStyle(new OBSProxyStyle("Fusion"));
|
||||
#else
|
||||
setStyle(new OBSProxyStyle());
|
||||
#endif
|
||||
|
||||
/* Set search paths for custom 'theme:' URI prefix */
|
||||
string searchDir;
|
||||
|
|
|
@ -1987,12 +1987,6 @@ static int run_program(fstream &logFile, int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
/* NOTE: The Breeze Qt style plugin adds frame arround QDockWidget with
|
||||
* QPainter which can not be modifed. To avoid this the base style is
|
||||
* enforce to the Qt default style on Linux: Fusion. */
|
||||
|
||||
setenv("QT_STYLE_OVERRIDE", "Fusion", false);
|
||||
|
||||
/* NOTE: Users blindly set this, but this theme is incompatble with Qt6 and
|
||||
* crashes loading saved geometry. Just turn off this theme and let users complain OBS
|
||||
* looks ugly instead of crashing. */
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
class OBSProxyStyle : public QProxyStyle {
|
||||
public:
|
||||
OBSProxyStyle() : QProxyStyle() {}
|
||||
|
||||
OBSProxyStyle(const QString &key) : QProxyStyle(key) {}
|
||||
|
||||
int styleHint(StyleHint hint, const QStyleOption *option,
|
||||
const QWidget *widget,
|
||||
QStyleHintReturn *returnData) const override;
|
||||
|
|
Loading…
Reference in a new issue