Update examples/basic/colorpicker.c
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
6ff6b22644
commit
5c386e7665
1 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue