mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-04 00:20:51 +00:00
introduce MwNflat
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@723 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
static int create(MwWidget handle) {
|
||||
MwSetDefault(handle);
|
||||
|
||||
MwSetInteger(handle, MwNflat, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +24,13 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawWidgetBack(handle, &r, base, handle->pressed, MwTRUE);
|
||||
MwDrawWidgetBack(handle, &r, base, handle->pressed, MwGetInteger(handle, MwNflat) ? handle->pressed : 1);
|
||||
if(MwGetInteger(handle, MwNflat) && !handle->pressed) {
|
||||
r.x += MwDefaultBorderWidth(handle);
|
||||
r.y += MwDefaultBorderWidth(handle);
|
||||
r.width -= MwDefaultBorderWidth(handle) * 2;
|
||||
r.height -= MwDefaultBorderWidth(handle) * 2;
|
||||
}
|
||||
|
||||
if(px != NULL) {
|
||||
int ow = r.width;
|
||||
@@ -61,7 +69,7 @@ static void click(MwWidget handle) {
|
||||
}
|
||||
|
||||
static void prop_change(MwWidget handle, const char* key) {
|
||||
if(strcmp(key, MwNtext) == 0 || strcmp(key, MwNpixmap) == 0) MwForceRender(handle);
|
||||
if(strcmp(key, MwNtext) == 0 || strcmp(key, MwNpixmap) == 0 || strcmp(key, MwNflat) == 0) MwForceRender(handle);
|
||||
}
|
||||
|
||||
MwClassRec MwButtonClassRec = {
|
||||
|
||||
Reference in New Issue
Block a user