mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-27 19:43:06 +00:00
fix
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@703 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -354,13 +354,16 @@ MwWidget MwColorPicker(MwWidget handle, const char* title) {
|
||||
color_picker_t* wheel;
|
||||
MwWidget window;
|
||||
MwSizeHints sh;
|
||||
int ww = MwGetInteger(handle, MwNwidth);
|
||||
int wh = MwGetInteger(handle, MwNheight);
|
||||
|
||||
p.x = p.y = 0;
|
||||
p.x = (ww - WIN_SIZE) / 2;
|
||||
p.y = (wh - WIN_SIZE) / 2;
|
||||
|
||||
sh.min_width = sh.max_width = WIN_SIZE;
|
||||
sh.min_height = sh.max_height = WIN_SIZE;
|
||||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", handle, MwDEFAULT, MwDEFAULT,
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", handle, 0, 0,
|
||||
WIN_SIZE, WIN_SIZE,
|
||||
MwNtitle, title,
|
||||
MwNsizeHints, &sh,
|
||||
@@ -372,8 +375,10 @@ MwWidget MwColorPicker(MwWidget handle, const char* title) {
|
||||
MwAddUserHandler(window, MwNtickHandler, color_picker_tick, wheel);
|
||||
MwAddTickList(window);
|
||||
|
||||
MwLLShow(window->lowlevel, 0);
|
||||
MwLLDetach(window->lowlevel, &p);
|
||||
MwLLMakePopup(window->lowlevel, handle->lowlevel);
|
||||
MwLLShow(window->lowlevel, 1);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -468,15 +468,15 @@ MwWidget MwFileChooser(MwWidget handle, const char* title) {
|
||||
|
||||
memset(fc, 0, sizeof(*fc));
|
||||
|
||||
p.x = 0;
|
||||
p.y = 0;
|
||||
|
||||
w = 700;
|
||||
h = w * 2 / 3;
|
||||
window = MwVaCreateWidget(MwWindowClass, "filechooser", handle, ww, wh, w, h,
|
||||
window = MwVaCreateWidget(MwWindowClass, "filechooser", handle, 0, 0, w, h,
|
||||
MwNtitle, title,
|
||||
NULL);
|
||||
|
||||
p.x = (ww - w) / 2;
|
||||
p.y = (wh - h) / 2;
|
||||
|
||||
fc->history_seek = 0;
|
||||
|
||||
fc->dir = MwLoadIcon(window, MwIconDirectory);
|
||||
@@ -501,8 +501,10 @@ MwWidget MwFileChooser(MwWidget handle, const char* title) {
|
||||
scan(window, path, 1);
|
||||
free(path);
|
||||
|
||||
MwLLShow(handle->lowlevel, 0);
|
||||
MwLLDetach(window->lowlevel, &p);
|
||||
MwLLMakePopup(window->lowlevel, handle->lowlevel);
|
||||
MwLLShow(handle->lowlevel, 1);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsi
|
||||
NULL);
|
||||
|
||||
MwLLShow(window->lowlevel, 0);
|
||||
MwLLDetach(window->lowlevel, &p);
|
||||
MwLLSetSizeHints(window->lowlevel, w, h, w, h);
|
||||
MwLLMakePopup(window->lowlevel, handle->lowlevel);
|
||||
MwLLDetach(window->lowlevel, &p);
|
||||
MwLLShow(window->lowlevel, 1);
|
||||
|
||||
MwAddUserHandler(window, MwNcloseHandler, messagebox_close, NULL);
|
||||
|
||||
Reference in New Issue
Block a user