Mercurial > minori
comparison src/sys/x11/dark_theme.cc @ 403:df4a027623d0 default tip
x11: fix build fail when glib is not detected
this can happen if glib is just not installed, or if dev headers are
not installed either.
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 10 Nov 2025 15:51:45 -0500 |
| parents | 5eaafed6c10b |
| children |
comparison
equal
deleted
inserted
replaced
| 402:d859306e2db4 | 403:df4a027623d0 |
|---|---|
| 1 #include "sys/x11/dark_theme.h" | 1 #include "sys/x11/dark_theme.h" |
| 2 #include "sys/glib/dark_theme.h" /* glib::IsGTKThemeDark */ | |
| 3 #include "sys/x11/settings.h" | 2 #include "sys/x11/settings.h" |
| 3 #include "core/strings.h" | |
| 4 | 4 |
| 5 namespace x11 { | 5 namespace x11 { |
| 6 | 6 |
| 7 bool IsInDarkTheme() | 7 bool IsInDarkTheme() |
| 8 { | 8 { |
| 9 SettingsItem setting; | 9 SettingsItem setting; |
| 10 if (!FindSetting(u8"Net/ThemeName", setting)) | 10 if (!FindSetting(u8"Net/ThemeName", setting)) |
| 11 return false; | 11 return false; |
| 12 | 12 |
| 13 return glib::IsGTKThemeDark(setting.data.string); | 13 return Strings::IsGTKThemeDark(setting.data.string); |
| 14 } | 14 } |
| 15 | 15 |
| 16 } // namespace x11 | 16 } // namespace x11 |
