experimental rounded corners idea
This commit is contained in:
parent
70f7f8f084
commit
8d7016367e
16 changed files with 224 additions and 63 deletions
|
|
@ -24,7 +24,7 @@ static void draw(MwWidget handle) {
|
|||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
if(MwGetInteger(handle, MwNhasBorder)) {
|
||||
MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted));
|
||||
MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted), 0);
|
||||
}
|
||||
|
||||
MwDrawRect(handle, &r, base);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static void draw(MwWidget handle) {
|
|||
|
||||
r.y += r.height;
|
||||
r.height = MwDefaultBorderWidth(handle) * 2;
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawFrame(handle, &r, base, 0, 0);
|
||||
|
||||
MwLLFreeColor(text);
|
||||
MwLLFreeColor(base);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ static void draw(MwWidget handle) {
|
|||
fr.y = 0;
|
||||
fr.width = MwGetInteger(handle, MwNwidth);
|
||||
fr.height = MwGetInteger(handle, MwNheight);
|
||||
MwDrawFrame(handle, &fr, base, inverted);
|
||||
MwDrawFrame(handle, &fr, base, inverted, 0);
|
||||
|
||||
rr.x = MwDefaultBorderWidth(handle);
|
||||
rr.y = MwDefaultBorderWidth(handle);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ 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));
|
||||
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted), 0);
|
||||
|
||||
MwDrawRect(handle, &r, base);
|
||||
if(px != NULL) {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ static void frame_draw(MwWidget handle) {
|
|||
p.x = MwDefaultBorderWidth(handle);
|
||||
p.y = MwDefaultBorderWidth(handle);
|
||||
|
||||
MwDrawFrame(handle, &r, base, 1);
|
||||
MwDrawFrame(handle, &r, base, 1, 0);
|
||||
MwDrawRect(handle, &r, base2);
|
||||
|
||||
r = r2;
|
||||
|
|
@ -282,7 +282,7 @@ static void frame_draw(MwWidget handle) {
|
|||
handle->bgcolor = NULL;
|
||||
}
|
||||
|
||||
MwDrawFrame(handle, &r, base, 1);
|
||||
MwDrawFrame(handle, &r, base, 1, 0);
|
||||
|
||||
MwLLFreeColor(text2);
|
||||
MwLLFreeColor(text);
|
||||
|
|
@ -401,7 +401,7 @@ static void draw(MwWidget handle) {
|
|||
r.y = 0;
|
||||
r.width = get_col_width(lb, i);
|
||||
r.height = MwDefaultBorderWidth(handle) * 2 + MwTextHeight(handle, "M");
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawFrame(handle, &r, base, 0, 0);
|
||||
|
||||
x += MwDefaultBorderWidth(handle);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ static void draw(MwWidget handle) {
|
|||
|
||||
BEGIN_MENU_LOOP;
|
||||
if(m->sub[i]->wsub != NULL || (in_area && handle->pressed)) {
|
||||
MwDrawFrame(handle, &r, base, MwFALSE);
|
||||
MwDrawFrame(handle, &r, base, MwFALSE, 0);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwFALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ static void draw(MwWidget handle) {
|
|||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, 1);
|
||||
MwDrawFrame(handle, &r, base, 1, 0);
|
||||
MwDrawRect(handle, &r, base);
|
||||
w = MwGetInteger(handle, MwNvalue) - MwGetInteger(handle, MwNminValue);
|
||||
w = w / (MwGetInteger(handle, MwNmaxValue) - MwGetInteger(handle, MwNminValue));
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ static void draw(MwWidget handle) {
|
|||
r.y = (r.height - 2) / 2;
|
||||
r.height = 2;
|
||||
}
|
||||
MwDrawFrameEx(handle, &r, base, 1, 1, 0, 0);
|
||||
MwDrawFrameEx(handle, &r, base, 1, 1, 0, 0, MwGetInteger(handle, MwNmodernLook));
|
||||
|
||||
MwLLFreeColor(base);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static void draw(MwWidget handle) {
|
|||
|
||||
rc.x += MwGetInteger(handle, MwNleftPadding);
|
||||
|
||||
MwDrawFrameEx(handle, &rc, base, 1, 1, 0, 0);
|
||||
MwDrawFrameEx(handle, &rc, base, 1, 1, 0, 0, 0);
|
||||
|
||||
p.y += 2 + 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static void recursion(MwWidget handle, MwTreeViewEntry* tree, MwTreeViewEntry**
|
|||
const int len = 4;
|
||||
|
||||
MwDrawRect(handle, &r, col);
|
||||
MwDrawFrame(handle, &r, base, tree->opened);
|
||||
MwDrawFrame(handle, &r, base, tree->opened, 0);
|
||||
if(tree->opened) {
|
||||
l[0].x = r.x + (r.width - len) / 2;
|
||||
l[0].y = r.y + r.height / 2;
|
||||
|
|
@ -91,7 +91,7 @@ static void recursion(MwWidget handle, MwTreeViewEntry* tree, MwTreeViewEntry**
|
|||
MwLLLine(handle->lowlevel, &l[0], text);
|
||||
}
|
||||
r = r2;
|
||||
MwDrawFrame(handle, &r, base, tree->opened);
|
||||
MwDrawFrame(handle, &r, base, tree->opened, 0);
|
||||
|
||||
if(col != base) MwLLFreeColor(col);
|
||||
} else {
|
||||
|
|
@ -183,7 +183,7 @@ static void frame_draw(MwWidget handle) {
|
|||
p.x = MwDefaultBorderWidth(handle);
|
||||
p.y = MwDefaultBorderWidth(handle);
|
||||
|
||||
MwDrawFrame(handle, &r, base, 1);
|
||||
MwDrawFrame(handle, &r, base, 1, 0);
|
||||
MwDrawRect(handle, &r, base2);
|
||||
|
||||
r = r2;
|
||||
|
|
@ -193,7 +193,7 @@ static void frame_draw(MwWidget handle) {
|
|||
recursion(handle, tv->tree[i], tv->tree, base, text, base2, text2, &p, 0, LineSpace, &skip, &shared, 1, NULL);
|
||||
}
|
||||
|
||||
MwDrawFrame(handle, &r, base, 1);
|
||||
MwDrawFrame(handle, &r, base, 1, 0);
|
||||
|
||||
MwLLFreeColor(text2);
|
||||
MwLLFreeColor(text);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static void draw(MwWidget handle) {
|
|||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, c, MwGetInteger(handle, MwNinverted));
|
||||
if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, c, MwGetInteger(handle, MwNinverted), 0);
|
||||
|
||||
MwDrawRect(handle, &r, c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue