Mercurial > minori
annotate 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 |
| rev | line source |
|---|---|
| 351 | 1 #include "sys/x11/dark_theme.h" |
| 2 #include "sys/x11/settings.h" | |
|
403
df4a027623d0
x11: fix build fail when glib is not detected
Paper <paper@tflc.us>
parents:
379
diff
changeset
|
3 #include "core/strings.h" |
| 351 | 4 |
| 5 namespace x11 { | |
| 6 | |
| 379 | 7 bool IsInDarkTheme() |
| 8 { | |
| 351 | 9 SettingsItem setting; |
| 10 if (!FindSetting(u8"Net/ThemeName", setting)) | |
| 11 return false; | |
| 12 | |
|
403
df4a027623d0
x11: fix build fail when glib is not detected
Paper <paper@tflc.us>
parents:
379
diff
changeset
|
13 return Strings::IsGTKThemeDark(setting.data.string); |
| 351 | 14 } |
| 15 | |
| 379 | 16 } // namespace x11 |
