Add method to get "base" system UI color (macOS/Windows) and system theme change callback.

This commit is contained in:
bruvzg
2024-01-19 20:46:26 +02:00
parent e92d55bbf4
commit ee53ae28df
24 changed files with 282 additions and 22 deletions

View File

@@ -217,6 +217,8 @@ private:
};
List<MenuCall> deferred_menu_calls;
Callable system_theme_changed;
const NSMenu *_get_menu_root(const String &p_menu_root) const;
NSMenu *_get_menu_root(const String &p_menu_root);
bool _is_menu_opened(NSMenu *p_menu) const;
@@ -251,6 +253,8 @@ public:
void menu_open(NSMenu *p_menu);
void menu_close(NSMenu *p_menu);
void emit_system_theme_changed();
bool has_window(WindowID p_window) const;
WindowData &get_window(WindowID p_window);
@@ -351,6 +355,8 @@ public:
virtual bool is_dark_mode_supported() const override;
virtual bool is_dark_mode() const override;
virtual Color get_accent_color() const override;
virtual Color get_base_color() const override;
virtual void set_system_theme_change_callback(const Callable &p_callable) override;
virtual Error dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) override;
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) override;