add MwNdarkThemeHandler

This commit is contained in:
NishiOwO
2026-01-27 18:51:57 +09:00
parent 626294c95f
commit bbb20f081e
2 changed files with 6 additions and 1 deletions

View File

@@ -72,5 +72,6 @@
#define MwNcolorChosenHandler "CcolorChosen" /* MwRGB* */
#define MwNdrawHandler "Cdraw" /* NULL */
#define MwNclipboardHandler "Cclipboard" /* char* */
#define MwNdarkThemeHandler "CdarkTheme" /* int* */
#endif

View File

@@ -131,7 +131,11 @@ static void lldarkthemehandler(MwLL handle, void* data) {
MwWidget h = (MwWidget)handle->common.user;
int* ptr = data;
if(IsFirstVisible(h)) MwSetDarkTheme(h, *ptr);
if(IsFirstVisible(h)) {
MwSetDarkTheme(h, *ptr);
MwDispatchUserHandler(h, MwNdarkThemeHandler, data);
}
}
MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height) {