Skip to content

Commit fc51697

Browse files
committed
Implement autoconfig for ZorinOS
1 parent 1388961 commit fc51697

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/frontend/PlatformConfig.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ DesktopEnvironment detectDesktopEnvironment() {
5555

5656
const QString de = desktopEnvs.join(';').toLower();
5757

58+
if (de.contains("zorin")) return DesktopEnvironment::ZorinOS;
5859
if (de.contains("gnome")) return DesktopEnvironment::GNOME;
5960
if (de.contains("kde")) return DesktopEnvironment::KDE;
6061
if (de.contains("xfce")) return DesktopEnvironment::XFCE;
@@ -91,6 +92,7 @@ QString desktopEnvironmentToString(DesktopEnvironment de) {
9192
case DesktopEnvironment::Unity: return "Unity";
9293
case DesktopEnvironment::Pantheon: return "Pantheon";
9394
case DesktopEnvironment::Deepin: return "Deepin";
95+
case DesktopEnvironment::ZorinOS: return "ZorinOS";
9496
case DesktopEnvironment::Wayland: return "Wayland";
9597
case DesktopEnvironment::X11: return "X11";
9698
default: return "Unknown";
@@ -131,7 +133,7 @@ bool isAppIndicatorEnabled() {
131133

132134
bool shouldShowTrayIcon() {
133135
DesktopEnvironment de = detectDesktopEnvironment();
134-
if (de == DesktopEnvironment::GNOME) {
136+
if (de == DesktopEnvironment::GNOME || de == DesktopEnvironment::ZorinOS) {
135137
return isAppIndicatorEnabled();
136138
} else if(de == DesktopEnvironment::Pantheon) {
137139
// Pantheon (Elementary OS) does not support AppIndicator
@@ -440,7 +442,7 @@ void setupKdeIME() {
440442
void setupInputSources() {
441443
auto de = detectDesktopEnvironment();
442444

443-
if(de == DesktopEnvironment::GNOME) {
445+
if(de == DesktopEnvironment::GNOME || de == DesktopEnvironment::ZorinOS) {
444446
setupGnomeIME();
445447
} else if(de == DesktopEnvironment::KDE) {
446448
setupKdeIME();

src/frontend/PlatformConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
Unity,
3232
Pantheon,
3333
Deepin,
34+
ZorinOS,
3435
Wayland,
3536
X11
3637
};

0 commit comments

Comments
 (0)