mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 03:13:28 +00:00
fancy things
This commit is contained in:
@@ -526,6 +526,7 @@
|
|||||||
<property name="pixmap" />
|
<property name="pixmap" />
|
||||||
<property name="hasBorder" />
|
<property name="hasBorder" />
|
||||||
<property name="inverted" />
|
<property name="inverted" />
|
||||||
|
<property name="fillArea" />
|
||||||
</properties>
|
</properties>
|
||||||
</widget>
|
</widget>
|
||||||
<widget name="Label">
|
<widget name="Label">
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ static void force_render_all(MwWidget handle) {
|
|||||||
for(i = 0; i < arrlen(handle->children); i++) {
|
for(i = 0; i < arrlen(handle->children); i++) {
|
||||||
force_render_all(handle->children[i]);
|
force_render_all(handle->children[i]);
|
||||||
}
|
}
|
||||||
MwForceRender(handle);
|
if(handle->lowlevel != NULL) MwForceRender(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwToggleDarkTheme(MwWidget handle, int toggle) {
|
void MwToggleDarkTheme(MwWidget handle, int toggle) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ static int create(MwWidget handle) {
|
|||||||
|
|
||||||
MwSetInteger(handle, MwNhasBorder, 0);
|
MwSetInteger(handle, MwNhasBorder, 0);
|
||||||
MwSetInteger(handle, MwNinverted, 1);
|
MwSetInteger(handle, MwNinverted, 1);
|
||||||
|
MwSetInteger(handle, MwNfillArea, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -23,6 +24,13 @@ static void draw(MwWidget handle) {
|
|||||||
|
|
||||||
MwDrawRect(handle, &r, base);
|
MwDrawRect(handle, &r, base);
|
||||||
if(px != NULL) {
|
if(px != NULL) {
|
||||||
|
if(!MwGetInteger(handle, MwNfillArea)) {
|
||||||
|
r.x = (r.width - px->common.width) / 2;
|
||||||
|
r.y = (r.height - px->common.height) / 2;
|
||||||
|
r.width = px->common.width;
|
||||||
|
r.height = px->common.height;
|
||||||
|
}
|
||||||
|
|
||||||
MwLLDrawPixmap(handle->lowlevel, &r, px);
|
MwLLDrawPixmap(handle->lowlevel, &r, px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user