rounded corners on select widgets #12
3 changed files with 4 additions and 1 deletions
MwNisRounded
commit
00e44bec32
|
|
@ -40,6 +40,7 @@
|
||||||
#define MwNlength "Ilength"
|
#define MwNlength "Ilength"
|
||||||
#define MwNforceInverted "IforceInverted"
|
#define MwNforceInverted "IforceInverted"
|
||||||
#define MwNroundness "Iroundness"
|
#define MwNroundness "Iroundness"
|
||||||
|
#define MwNisRounded "IisRounded"
|
||||||
|
|
||||||
#define MwNtitle "Stitle"
|
#define MwNtitle "Stitle"
|
||||||
#define MwNtext "Stext"
|
#define MwNtext "Stext"
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,7 @@ int MwGetInteger(MwWidget handle, const char* key) {
|
||||||
#else
|
#else
|
||||||
if(strcmp(key, MwNmodernLook) == 0) return inherit_integer(handle, key, 1);
|
if(strcmp(key, MwNmodernLook) == 0) return inherit_integer(handle, key, 1);
|
||||||
#endif
|
#endif
|
||||||
|
if(strcmp(key, MwNisRounded) == 0) return inherit_integer(handle, key, 1);
|
||||||
}
|
}
|
||||||
return shget(handle->integer, key);
|
return shget(handle->integer, key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int
|
||||||
|
|
||||||
void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border) {
|
void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border) {
|
||||||
MwLLColor col;
|
MwLLColor col;
|
||||||
MwBool rounded = handle->lowlevel->common.supports_transparency && MwGetInteger(handle, MwNroundness) != MwDEFAULT;
|
MwBool rounded = handle->lowlevel->common.supports_transparency && MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0;
|
||||||
|
|
||||||
if(border) {
|
if(border) {
|
||||||
MwDrawFrame(handle, rect, color, invert, rounded);
|
MwDrawFrame(handle, rect, color, invert, rounded);
|
||||||
|
|
@ -333,6 +333,7 @@ void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, i
|
||||||
|
|
||||||
p[5].x = rect->x + roundness;
|
p[5].x = rect->x + roundness;
|
||||||
p[5].y = rect->y + rect->height - roundness;
|
p[5].y = rect->y + rect->height - roundness;
|
||||||
|
MwLLPolygon(handle->lowlevel, p, 6, invert ? darker : lighter);
|
||||||
|
|
||||||
/* top right edge */
|
/* top right edge */
|
||||||
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
|
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue