This commit is contained in:
parent
231df890c1
commit
73833b9e06
2 changed files with 5 additions and 5 deletions
|
|
@ -35,12 +35,14 @@ int main() {
|
|||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT,
|
||||
MwDEFAULT, 640, 480, MwNtitle, "color picker", NULL);
|
||||
MwSetText(window, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground);
|
||||
MwSetText(window, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground);
|
||||
MwSetText(window, MwNforeground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultDarkForeground : MwDefaultForeground);
|
||||
|
||||
button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120,
|
||||
MwNtext, "change window background",
|
||||
NULL);
|
||||
MwSetText(button, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground);
|
||||
MwSetText(button, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground);
|
||||
MwSetText(button, MwNforeground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultDarkForeground : MwDefaultForeground);
|
||||
|
||||
MwAddUserHandler(button, MwNactivateHandler, file_picker, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -64,13 +64,11 @@ int main() {
|
|||
MwLibraryInit();
|
||||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT,
|
||||
MwDEFAULT, 640, 480, MwNtitle, "color picker", NULL);
|
||||
MwSetText(window, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground);
|
||||
MwDEFAULT, 640, 480, MwNtitle, "file chooser", NULL);
|
||||
|
||||
button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120,
|
||||
MwNtext, "select file",
|
||||
NULL);
|
||||
MwSetText(button, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground);
|
||||
|
||||
MwAddUserHandler(button, MwNactivateHandler, file_picker, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue