I know there's no good reason to stick this in beofre 2.6, but it's a simple enough patch, can it be committed for inclusion after 2.6?
I have an FvwmIconMan inside of FvwmButtons. I was changing the "Frame" definition for various buttons, and wanted to change the relief width on the buttons in FvwmIconMan, and was suprised to find there was no way to do that. They're just 2. Always 2. So, I fixed this. They still default to two, but I added a "ReliefThickness" keyword to FvwmIconMan. You can set it to 0, as another way to get flat buttons, or to a positive integer to have the button-reliefs be that many pixels wide/thick. I don't know why you can't make it negative to get the equivalent of "Reverse" buttons, but that doesn't work. I don't think it's important to fix, but I'd be happy for anyone else to fix it. Again, the default after this patch will be the same. 2 pixels. But you can now change it. (I've set mine to 1). Thanks. Let me know when this can get checked in, and when that change will hit a release. Much appriciated. - Chris
Index: modules/FvwmIconMan/FvwmIconMan.1 =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/FvwmIconMan.1,v retrieving revision 1.27 diff -u -u -r1.27 FvwmIconMan.1 --- modules/FvwmIconMan/FvwmIconMan.1 19 Apr 2003 03:01:02 -0000 1.27 +++ modules/FvwmIconMan/FvwmIconMan.1 10 Feb 2004 18:39:38 -0000 @@ -108,6 +108,7 @@ NoIconAction animate iconification NOP PlainButton style for normal buttons up black grey PlainColorset +ReliefThickness size of button relief 2 Resolution global/desk/page/screen page Reverse normal, icon or none none SelectButton style for selected buttons flat black grey @@ -249,6 +250,13 @@ .IP "*FvwmIconMan: [id] PlainColorset \fIcolorset\fP" Works like plainbutton but uses colorsets instead. The style setting can still only be applied with plainbutton. See FvwmTheme. + +.IP "*FvwmIconMan: [id] ReliefThickness \fInum\fP" +\fInum\fP is a positive integer specifying the number of pixels thick +that the relief at the edge of non-flat buttons should be. This has +no effect on flat buttons. In theory, you should be able to set this +to a negative number and have it act like \fIReverse\fP, but negative +numbers don't work. This may change later. .IP "*FvwmIconMan: [id] Resolution \fIresolution\fP" Specifies when the manager will display an entry for a certain Index: modules/FvwmIconMan/FvwmIconMan.h =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/FvwmIconMan.h,v retrieving revision 1.55 diff -u -u -r1.55 FvwmIconMan.h --- modules/FvwmIconMan/FvwmIconMan.h 25 Aug 2003 06:47:09 -0000 1.55 +++ modules/FvwmIconMan/FvwmIconMan.h 10 Feb 2004 18:39:38 -0000 @@ -303,6 +303,7 @@ Uchar showonlyiconic; Uchar showtransient; rectangle managed_g; /* dimensions of managed screen portion */ + int relief_thickness; /* relief thickness for each non-flat button */ /* X11 state */ Window theWindow, theFrame; Index: modules/FvwmIconMan/globals.c =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/globals.c,v retrieving revision 1.25 diff -u -u -r1.25 globals.c --- modules/FvwmIconMan/globals.c 29 Jun 2003 19:53:25 -0000 1.25 +++ modules/FvwmIconMan/globals.c 10 Feb 2004 18:39:38 -0000 @@ -83,6 +83,7 @@ globals.managers[id].we_are_drawing = 1; globals.managers[id].showonlyiconic = 0; globals.managers[id].showtransient = 0; + globals.managers[id].relief_thickness = 2; } void print_managers(void) Index: modules/FvwmIconMan/readconfig.c =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/readconfig.c,v retrieving revision 1.55 diff -u -u -r1.55 readconfig.c --- modules/FvwmIconMan/readconfig.c 5 Jul 2003 01:37:47 -0000 1.55 +++ modules/FvwmIconMan/readconfig.c 10 Feb 2004 18:39:39 -0000 @@ -1951,6 +1951,19 @@ ConsoleDebug(CONFIG, "Setting usewinlist to: %d\n", i); SET_MANAGER(manager, usewinlist, i); } + else if (!strcasecmp(option1, "reliefthickness")) { + 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, relief_thickness, n); + } else { ConsoleMessage("Bad line: %s\n", current_line); ConsoleMessage("Unknown option: %s\n", p); Index: modules/FvwmIconMan/xmanager.c =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/xmanager.c,v retrieving revision 1.83 diff -u -u -r1.83 xmanager.c --- modules/FvwmIconMan/xmanager.c 25 Aug 2003 06:47:09 -0000 1.83 +++ modules/FvwmIconMan/xmanager.c 10 Feb 2004 18:39:39 -0000 @@ -1342,7 +1342,7 @@ RelieveRectangle(theDisplay, man->theWindow, g->icon_x, g->icon_y, g->icon_w - 1, g->icon_h - 1, man->reliefContext[contextId], - man->shadowContext[contextId], 2); + man->shadowContext[contextId], man->relief_thickness); } @@ -1543,13 +1543,16 @@ return; if (state == BUTTON_EDGEUP || state == BUTTON_EDGEDOWN) { RelieveRectangle(theDisplay, man->theWindow, g->button_x, g->button_y, - g->button_w - 1, g->button_h - 1, context1, context2, 2); + g->button_w - 1, g->button_h - 1, context1, context2, + man->relief_thickness); RelieveRectangle(theDisplay, man->theWindow, g->button_x+2, g->button_y+2, - g->button_w - 5, g->button_h - 5, context2, context1, 2); + g->button_w - 5, g->button_h - 5, context2, context1, + man->relief_thickness); } else { RelieveRectangle(theDisplay, man->theWindow, g->button_x, g->button_y, - g->button_w - 1, g->button_h - 1, context1, context2, 2); + g->button_w - 1, g->button_h - 1, context1, context2, + man->relief_thickness); } }