Skip to content

Commit

Permalink
force fusion style on OSX when screen height is below 900 pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Aug 16, 2024
1 parent f21a655 commit 330f933
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/texstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,20 @@ Texstudio::Texstudio(QWidget *parent, Qt::WindowFlags flags, QSplashScreen *spla
if(Version::compareStringVersion(txsVersionConfigWritten,"4.8.0")==Version::Lower){
resetDocks();
}
#ifdef Q_OS_MAC
if(qApp->primaryScreen()->size().height()<=900){
// on OSX only, force style to FUSION if style is MACOS (https://github.com/texstudio-org/texstudio/issues/3637)
if(configManager.interfaceStyle.isEmpty() || configManager.interfaceStyle == "macOS"){
configManager.interfaceStyle = "Fusion";
configManager.setInterfaceStyle();
}
}
#endif
// check if dock widgets are all spread and force a reset
if(checkDockSpread()){
#ifdef Q_OS_MAC
// on OSX only, force style to FUSION if style is MACOS (https://github.com/texstudio-org/texstudio/issues/3637)
if(configManager.interfaceStyle == "macOS"){
if(configManager.interfaceStyle.isEmpty() || configManager.interfaceStyle == "macOS"){
configManager.interfaceStyle = "Fusion";
configManager.setInterfaceStyle();
}
Expand Down

0 comments on commit 330f933

Please sign in to comment.