mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +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">
|
||||
<properties>
|
||||
<property name="pixmap" />
|
||||
<property name="hasBorder" />
|
||||
<property name="inverted" />
|
||||
</properties>
|
||||
</widget>
|
||||
<widget name="Label">
|
||||
@@ -585,6 +587,8 @@
|
||||
<property name="main" />
|
||||
<property name="iconPixmap" />
|
||||
<property name="sizeHints" />
|
||||
<property name="hasBorder" />
|
||||
<property name="inverted" />
|
||||
</properties>
|
||||
<functions>
|
||||
<function name="MakeBorderless" />
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
static int create(MwWidget handle) {
|
||||
MwSetDefault(handle);
|
||||
|
||||
MwSetInteger(handle, MwNhasBorder, 0);
|
||||
MwSetInteger(handle, MwNinverted, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -16,6 +19,9 @@ static void draw(MwWidget handle) {
|
||||
r.y = 0;
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted));
|
||||
|
||||
MwDrawRect(handle, &r, base);
|
||||
if(px != NULL) {
|
||||
MwLLDrawPixmap(handle->lowlevel, &r, px);
|
||||
@@ -25,7 +31,7 @@ static void draw(MwWidget handle) {
|
||||
}
|
||||
|
||||
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 = {
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
static int create(MwWidget handle) {
|
||||
MwSetDefault(handle);
|
||||
|
||||
MwSetInteger(handle, MwNhasBorder, 0);
|
||||
MwSetInteger(handle, MwNinverted, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -16,10 +19,17 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted));
|
||||
|
||||
MwDrawRect(handle, &r, 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) {
|
||||
MwLLBeginStateChange(handle->lowlevel);
|
||||
MwLLMakeBorderless(handle->lowlevel, toggle);
|
||||
@@ -40,7 +50,7 @@ MwClassRec MwWindowClassRec = {
|
||||
draw, /* draw */
|
||||
NULL, /* click */
|
||||
NULL, /* parent_resize */
|
||||
NULL, /* prop_change */
|
||||
prop_change, /* prop_change */
|
||||
NULL, /* mouse_move */
|
||||
NULL, /* mouse_up */
|
||||
NULL, /* mouse_down */
|
||||
|
||||
Reference in New Issue
Block a user