mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-09 02:43:30 +00:00
things
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@731 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -462,6 +462,8 @@
|
|||||||
<widget name="Image">
|
<widget name="Image">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="pixmap" />
|
<property name="pixmap" />
|
||||||
|
<property name="hasBorder" />
|
||||||
|
<property name="inverted" />
|
||||||
</properties>
|
</properties>
|
||||||
</widget>
|
</widget>
|
||||||
<widget name="Label">
|
<widget name="Label">
|
||||||
@@ -585,6 +587,8 @@
|
|||||||
<property name="main" />
|
<property name="main" />
|
||||||
<property name="iconPixmap" />
|
<property name="iconPixmap" />
|
||||||
<property name="sizeHints" />
|
<property name="sizeHints" />
|
||||||
|
<property name="hasBorder" />
|
||||||
|
<property name="inverted" />
|
||||||
</properties>
|
</properties>
|
||||||
<functions>
|
<functions>
|
||||||
<function name="MakeBorderless" />
|
<function name="MakeBorderless" />
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
static int create(MwWidget handle) {
|
static int create(MwWidget handle) {
|
||||||
MwSetDefault(handle);
|
MwSetDefault(handle);
|
||||||
|
|
||||||
|
MwSetInteger(handle, MwNhasBorder, 0);
|
||||||
|
MwSetInteger(handle, MwNinverted, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,6 +19,9 @@ static void draw(MwWidget handle) {
|
|||||||
r.y = 0;
|
r.y = 0;
|
||||||
r.width = MwGetInteger(handle, MwNwidth);
|
r.width = MwGetInteger(handle, MwNwidth);
|
||||||
r.height = MwGetInteger(handle, MwNheight);
|
r.height = MwGetInteger(handle, MwNheight);
|
||||||
|
|
||||||
|
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted));
|
||||||
|
|
||||||
MwDrawRect(handle, &r, base);
|
MwDrawRect(handle, &r, base);
|
||||||
if(px != NULL) {
|
if(px != NULL) {
|
||||||
MwLLDrawPixmap(handle->lowlevel, &r, px);
|
MwLLDrawPixmap(handle->lowlevel, &r, px);
|
||||||
@@ -25,7 +31,7 @@ static void draw(MwWidget handle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void prop_change(MwWidget handle, const char* key) {
|
static void prop_change(MwWidget handle, const char* key) {
|
||||||
if(strcmp(key, MwNpixmap) == 0) MwForceRender(handle);
|
if(strcmp(key, MwNpixmap) == 0 || strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0) MwForceRender(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
MwClassRec MwImageClassRec = {
|
MwClassRec MwImageClassRec = {
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
static int create(MwWidget handle) {
|
static int create(MwWidget handle) {
|
||||||
MwSetDefault(handle);
|
MwSetDefault(handle);
|
||||||
|
|
||||||
|
MwSetInteger(handle, MwNhasBorder, 0);
|
||||||
|
MwSetInteger(handle, MwNinverted, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,10 +19,17 @@ static void draw(MwWidget handle) {
|
|||||||
r.width = MwGetInteger(handle, MwNwidth);
|
r.width = MwGetInteger(handle, MwNwidth);
|
||||||
r.height = MwGetInteger(handle, MwNheight);
|
r.height = MwGetInteger(handle, MwNheight);
|
||||||
|
|
||||||
|
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted));
|
||||||
|
|
||||||
MwDrawRect(handle, &r, c);
|
MwDrawRect(handle, &r, c);
|
||||||
|
|
||||||
MwLLFreeColor(c);
|
MwLLFreeColor(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void prop_change(MwWidget handle, const char* key) {
|
||||||
|
if(strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0) MwForceRender(handle);
|
||||||
|
}
|
||||||
|
|
||||||
static void mwWindowMakeBorderlessImpl(MwWidget handle, int toggle) {
|
static void mwWindowMakeBorderlessImpl(MwWidget handle, int toggle) {
|
||||||
MwLLBeginStateChange(handle->lowlevel);
|
MwLLBeginStateChange(handle->lowlevel);
|
||||||
MwLLMakeBorderless(handle->lowlevel, toggle);
|
MwLLMakeBorderless(handle->lowlevel, toggle);
|
||||||
@@ -40,7 +50,7 @@ MwClassRec MwWindowClassRec = {
|
|||||||
draw, /* draw */
|
draw, /* draw */
|
||||||
NULL, /* click */
|
NULL, /* click */
|
||||||
NULL, /* parent_resize */
|
NULL, /* parent_resize */
|
||||||
NULL, /* prop_change */
|
prop_change, /* prop_change */
|
||||||
NULL, /* mouse_move */
|
NULL, /* mouse_move */
|
||||||
NULL, /* mouse_up */
|
NULL, /* mouse_up */
|
||||||
NULL, /* mouse_down */
|
NULL, /* mouse_down */
|
||||||
|
|||||||
Reference in New Issue
Block a user