mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-01 15:10:50 +00:00
things
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@577 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -710,6 +710,14 @@ void MwLLMakePopup(MwLL handle, MwLL parent) {
|
||||
XSetTransientForHint(handle->display, handle->window, parent->window);
|
||||
XChangeProperty(handle->display, handle->window, wndtype, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wnddlg, 1);
|
||||
XChangeProperty(handle->display, handle->window, wndstate, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wndmodal, 1);
|
||||
|
||||
XUnmapWindow(handle->display, handle->window);
|
||||
XMapWindow(handle->display, handle->window);
|
||||
|
||||
XFlush(handle->display);
|
||||
XSync(handle->display, False);
|
||||
|
||||
wait_map(handle);
|
||||
}
|
||||
|
||||
void MwLLSetSizeHints(MwLL handle, int minx, int miny, int maxx, int maxy) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
#define WIN_SIZE 512
|
||||
#define WIN_SIZE 464
|
||||
#define PICKER_SIZE 360
|
||||
#define IMG_POS_X(w) ((w - PICKER_SIZE) / 2)
|
||||
#define IMG_POS_Y(h) ((h - PICKER_SIZE) / 2)
|
||||
@@ -290,7 +290,7 @@ color_picker_t* color_picker_setup(MwWidget parent, int w, int h) {
|
||||
|
||||
picker->finish = MwCreateWidget(
|
||||
MwButtonClass, "colorPickerFinish", picker->parent, IMG_POS_X(w),
|
||||
IMG_POS_Y(h) + PICKER_SIZE + MARGIN, PICKER_SIZE, PICKER_SIZE / 8);
|
||||
IMG_POS_Y(h) + PICKER_SIZE + MARGIN, PICKER_SIZE, (WIN_SIZE - PICKER_SIZE - MARGIN * 4) / 2);
|
||||
MwSetText(picker->finish, MwNtext, "Select");
|
||||
MwSetInteger(picker->finish, MwnhasBorder, 1);
|
||||
MwSetInteger(picker->finish, MwNinverted, 1);
|
||||
@@ -308,11 +308,18 @@ MwWidget MwColorPicker(MwWidget handle, const char* title) {
|
||||
MwPoint p;
|
||||
color_picker_t* wheel;
|
||||
MwWidget window;
|
||||
MwSizeHints sh;
|
||||
|
||||
p.x = p.y = 0;
|
||||
|
||||
sh.min_width = sh.max_width = WIN_SIZE;
|
||||
sh.min_height = sh.max_height = WIN_SIZE;
|
||||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", handle, MwDEFAULT, MwDEFAULT,
|
||||
WIN_SIZE, WIN_SIZE, MwNtitle, title, NULL);
|
||||
WIN_SIZE, WIN_SIZE,
|
||||
MwNtitle, title,
|
||||
MwNsizeHints, &sh,
|
||||
NULL);
|
||||
|
||||
wheel = color_picker_setup(window, WIN_SIZE, WIN_SIZE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user