Index: modules/FvwmIconMan/readconfig.c =================================================================== --- modules/FvwmIconMan/readconfig.c (revision 14) +++ modules/FvwmIconMan/readconfig.c (revision 15) @@ -2028,6 +2028,40 @@ } SET_MANAGER(manager, relief_thickness, n); } + else if (!strcasecmp(option1, "padding")) { + p = read_next_cmd(READ_ARG); + if (!p) { + ConsoleMessage("Bad line: %s\n", current_line); + continue; + } + if (extract_int(p, &n) == 0) { + ConsoleMessage("This is not a number: %s\n", p); + ConsoleMessage("Bad line: %s\n", current_line); + continue; + } + SET_MANAGER(manager, padding, n); + } + else if (!strcasecmp(option1, "roundedcorners")) { + p = read_next_cmd(READ_ARG); + if (!p) { + ConsoleMessage("Bad line: %s\n", current_line); + ConsoleMessage("Need argument to roundedcorners\n"); + continue; + } + if (!strcasecmp(p, "true")) { + i = 1; + } + else if (!strcasecmp(p, "false")) { + i = 0; + } + else { + ConsoleMessage("Bad line: %s\n", current_line); + ConsoleMessage("What is this: %s?\n", p); + continue; + } + ConsoleDebug(CONFIG, "Setting roundedcorners to: %d\n", i); + SET_MANAGER(manager, roundedcorners, i); + } else if (!strcasecmp(option1, "tips")) { p = read_next_cmd(READ_ARG); if (!p) { Index: modules/FvwmIconMan/xmanager.c =================================================================== --- modules/FvwmIconMan/xmanager.c (revision 14) +++ modules/FvwmIconMan/xmanager.c (revision 15) @@ -1396,6 +1396,8 @@ g->text_y = g->button_y + text_pad; g->text_base = g->text_y + man->FButtonFont->ascent; + + g->button_w -= man->padding; } static void draw_button_background( @@ -1668,6 +1670,33 @@ } } +static void __draw_rounded_corner(WinManager *man, ButtonGeometry *g, + int x, int y, int width, int height, GC gc) +{ + int x1 = g->button_x + x; + int x2 = g->button_x + g->button_w - x - width; + int y1 = g->button_y + y; + int y2 = g->button_y + g->button_h - y - height; + + XFillRectangle(theDisplay, man->theWindow, gc, x1, y1, width, height); + XFillRectangle(theDisplay, man->theWindow, gc, x2, y1, width, height); + XFillRectangle(theDisplay, man->theWindow, gc, x1, y2, width, height); + XFillRectangle(theDisplay, man->theWindow, gc, x2, y2, width, height); +} + +static void draw_rounded_corners(WinManager *man, ButtonGeometry *g, GC gc) +{ + if (man->roundedcorners) + { + __draw_rounded_corner(man, g, 0, 0, 2, 1, man->backContext[TITLE_CONTEXT]); + __draw_rounded_corner(man, g, 0, 1, 1, 1, man->backContext[TITLE_CONTEXT]); + __draw_rounded_corner(man, g, 1, 1, 1, 1, gc); + } + + XFillRectangle(theDisplay, man->theWindow, man->backContext[TITLE_CONTEXT], + g->button_x + g->button_w, g->button_y, man->padding, g->button_h); +} + static void draw_button(WinManager *man, int button, int force) { Button *b; @@ -1856,6 +1885,8 @@ draw_relief( man, button_state, &g, context1, context2); + + draw_rounded_corners(man, &g, context1); } else if (button_state & SELECT_CONTEXT) { Index: modules/FvwmIconMan/FvwmIconMan.h =================================================================== --- modules/FvwmIconMan/FvwmIconMan.h (revision 14) +++ modules/FvwmIconMan/FvwmIconMan.h (revision 15) @@ -315,6 +315,8 @@ char *tips_fontname; char *tips_formatstring; ftips_config *tips_conf; + Uchar roundedcorners; + int padding; /* X11 state */ Window theWindow, theFrame;