You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Add support for system dark mode (Linux)
- Use `org.freedesktop.appearance color-scheme` to support system dark mode.
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
#include "freedesktop_portal_desktop.h"
|
||||
#include "freedesktop_screensaver.h"
|
||||
#endif
|
||||
|
||||
@@ -120,6 +121,10 @@ class DisplayServerX11 : public DisplayServer {
|
||||
TTS_Linux *tts = nullptr;
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
FreeDesktopPortalDesktop *portal_desktop = nullptr;
|
||||
#endif
|
||||
|
||||
struct WindowData {
|
||||
Window x11_window;
|
||||
::XIC xic;
|
||||
@@ -320,6 +325,11 @@ public:
|
||||
virtual void tts_stop() override;
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
virtual bool is_dark_mode_supported() const override;
|
||||
virtual bool is_dark_mode() const override;
|
||||
#endif
|
||||
|
||||
virtual void mouse_set_mode(MouseMode p_mode) override;
|
||||
virtual MouseMode mouse_get_mode() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user