Update examples/basic/colorpicker.c
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-04-15 03:08:55 -05:00
commit 5c386e7665

View file

@ -1,4 +1,3 @@
#include <Mw/Milsko.h> #include <Mw/Milsko.h>
MwWidget cpicker; MwWidget cpicker;
@ -28,7 +27,7 @@ void color_picker(MwWidget handle, void* user_data, void* call_data) {
MwAddUserHandler(cpicker, MwNcolorChosenHandler, color_callback, NULL); MwAddUserHandler(cpicker, MwNcolorChosenHandler, color_callback, NULL);
MwSetText(cpicker, MwNbackground, MwGetInteger(cpicker, MwNdarkTheme) ? MwDefaultForeground : MwDefaultBackground); MwSetText(cpicker, MwNbackground, MwGetInteger(cpicker, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground);
} }
int main() { int main() {
@ -41,7 +40,7 @@ int main() {
button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120, button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120,
MwNtext, "change window background", MwNtext, "change window background",
NULL); NULL);
MwSetText(button, MwNbackground, MwGetInteger(button, MwNdarkTheme) ? MwDefaultForeground : MwDefaultBackground); MwSetText(button, MwNbackground, MwGetInteger(button, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground);
MwAddUserHandler(button, MwNactivateHandler, color_picker, NULL); MwAddUserHandler(button, MwNactivateHandler, color_picker, NULL);