xfwm4: bigger buttons, top left/right px clickable

Allow the top left and right pixels of maximized windows to be clickable
if there's a window button there, for greater Fitts's Law compliance. The
exception is the window menu button, which needs a minor hack to be sized
correctly.

Somewhat darker inactive button icons, to match window title text.

Add an SVG-based build system to allow colours to be changed easily.
This commit is contained in:
Andrew Chadwick
2014-02-10 21:23:27 +00:00
parent 686a0b4007
commit 73491d3470
50 changed files with 2147 additions and 557 deletions
+67
View File
@@ -0,0 +1,67 @@
SRCDIR=src
TARGS=close-pressed.xpm close-prelight.xpm close-inactive.xpm close-active.xpm \
hide-pressed.xpm hide-prelight.xpm hide-inactive.xpm hide-active.xpm \
menu-pressed.xpm menu-prelight.xpm menu-inactive.xpm menu-active.xpm \
shade-pressed.xpm shade-prelight.xpm shade-inactive.xpm shade-active.xpm \
shade-toggled-pressed.xpm shade-toggled-prelight.xpm \
shade-toggled-inactive.xpm shade-toggled-active.xpm \
stick-pressed.xpm stick-prelight.xpm stick-inactive.xpm stick-active.xpm \
stick-toggled-pressed.xpm stick-toggled-prelight.xpm \
stick-toggled-inactive.xpm stick-toggled-active.xpm \
maximize-pressed.xpm maximize-prelight.xpm \
maximize-inactive.xpm maximize-active.xpm \
maximize-toggled-pressed.xpm maximize-toggled-prelight.xpm \
maximize-toggled-inactive.xpm maximize-toggled-active.xpm
BASE_MENU=$(SRCDIR)/button-base-menu.xpm
BASE_ACTIVE=$(SRCDIR)/button-base-active.xpm
BASE_INACTIVE=$(SRCDIR)/button-base-inactive.xpm
COL_PRESSED=\#B44335
COL_PRELIGHT=\#D64937
COL_ACTIVE=\#DCDCDC
COL_INACTIVE=\#888
all: $(TARGS)
# Base images for the menu, a 22x16 blank surface in all states. The 16px
# constrains the window icon's size to 16x16.
menu-%.xpm: $(BASE_MENU)
convert $< $@
# Combined icon images built from 8x8 SVG sources
# The base images are 22x25, width carefully chosen to provide the right
# spacing and rhythm, and height including an additional top pixel of the
# active/inactive edge colour.
%-inactive.xpm: $(SRCDIR)/%.svg $(BASE_INACTIVE)
convert $(BASE_INACTIVE) \
\( -background none +level-colors "$(COL_INACTIVE)" $< \) \
-geometry +7+9 -composite $@
%-pressed.xpm: $(SRCDIR)/%.svg $(BASE_ACTIVE)
convert $(BASE_ACTIVE) \
\( -background none +level-colors "$(COL_PRESSED)" $< \) \
-geometry +7+9 -composite $@
%-prelight.xpm: $(SRCDIR)/%.svg $(BASE_ACTIVE)
convert $(BASE_ACTIVE) \
\( -background none +level-colors "$(COL_PRELIGHT)" $< \) \
-geometry +7+9 -composite $@
%-active.xpm: $(SRCDIR)/%.svg $(BASE_ACTIVE)
convert $(BASE_ACTIVE) \
\( -background none +level-colors "$(COL_ACTIVE)" $< \) \
-geometry +7+9 -composite $@
clean:
rm -f $(TARGS)
+38 -33
View File
@@ -1,34 +1,39 @@
/* XPM */
static char * close_active_xpm[] = {
"16 16 15 1",
" c None",
". c #2D2D2D",
"+ c #DCDCDC",
"@ c #A4A4A4",
"# c #3F3F3F",
"$ c #A6A6A6",
"% c #D1D1D1",
"& c #525252",
"* c #414141",
"= c #D3D3D3",
"- c #CECECE",
"; c #575757",
"> c #505050",
", c #A2A2A2",
"' c #3D3D3D",
"................",
"................",
"................",
"................",
"....+@#..#@+....",
"....$+%&&%+@....",
"....*=+--+%#....",
".....;=++-&.....",
".....;=++-&.....",
"....*=+--+%#....",
"....$+->>-+@....",
"....+,'..',+....",
"................",
"................",
"................",
"................"};
static char *close_active[] = {
/* columns rows colors chars-per-pixel */
"22 25 8 1 ",
" c #2D2D2D2D2D2D",
". c #407740774077",
"X c #454A454A454A",
"o c #484848484848",
"O c #C40FC40FC40F",
"+ c #C4BFC4BFC4BF",
"@ c #CBA3CBA3CBA3",
"# c gainsboro",
/* pixels */
"oooooooooooooooooooooo",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" #O. .+# ",
" @#O..+#+ ",
" .O#@@#+. ",
" .+##@. ",
" X@##@X ",
" X@#+@#@X ",
" +#@X.@#+ ",
" #+. .+# ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+36 -34
View File
@@ -1,35 +1,37 @@
/* XPM */
static char * close_inactive_xpm[] = {
"16 16 16 1",
" c None",
". c #2D2D2D",
"+ c #AAAAAA",
"@ c #828282",
"# c #3A3A3A",
"$ c #848484",
"% c #A2A2A2",
"& c #474747",
"* c #3B3B3B",
"= c #A4A4A4",
"- c #A0A0A0",
"; c #4B4B4B",
"> c #A1A1A1",
", c #464646",
"' c #818181",
") c #383838",
"................",
"................",
"................",
"................",
"....+@#..#@+....",
"....$+%&&%+@....",
"....*=+--+%#....",
".....;=++-&.....",
".....;=++-&.....",
"....*=+--+%#....",
"....$+>,,>+@....",
"....+')..)'+....",
"................",
"................",
"................",
"................"};
static char *close_inactive[] = {
/* columns rows colors chars-per-pixel */
"22 25 6 1 ",
" c #2D2D2D2D2D2D",
". c #375437543754",
"X c #394439443944",
"o c #7BA27BA27BA2",
"O c #7F7C7F7C7F7C",
"+ c #888888888888",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXX",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" +o. .o+ ",
" O+o..o+O ",
" .o+OO+o. ",
" .O++O. ",
" .O++O. ",
" XO+oO+OX ",
" o+OX.O+O ",
" +o. .o+ ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+38 -35
View File
@@ -1,36 +1,39 @@
/* XPM */
static char * close_prelight_xpm[] = {
"16 16 17 1",
" c None",
". c #2D2D2D",
"+ c #D64937",
"@ c #A04034",
"# c #3F302E",
"$ c #A34033",
"% c #CC4736",
"& c #50322F",
"* c #40302D",
"= c #CE4736",
"- c #C94636",
"; c #57332F",
"> c #C84636",
", c #CA4736",
"' c #4F332F",
") c #9E3F33",
"! c #3C2F2D",
"................",
"................",
"................",
"................",
"....+@#..#@+....",
"....$+%&&%+@....",
"....*=+--+%#....",
".....;=++-&.....",
".....;=++-&.....",
"....*=+>>+%#....",
"....$+,'',+@....",
"....+)!..!)+....",
"................",
"................",
"................",
"................"};
static char *close_prelight[] = {
/* columns rows colors chars-per-pixel */
"22 25 8 1 ",
" c #2D2D2D2D2D2D",
". c #4007304C2E4A",
"X c #452131252E98",
"o c #484848484848",
"O c #BEE2455135CC",
"+ c #C23645DE35FF",
"@ c #C60A46813639",
"# c #D6D649493737",
/* pixels */
"oooooooooooooooooooooo",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" #O. .O# ",
" +#O..O#+ ",
" .O#@@#O. ",
" .@##+. ",
" X@##@X ",
" X+#++#+X ",
" +#@.X@#+ ",
" #O. .+# ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+38 -35
View File
@@ -1,36 +1,39 @@
/* XPM */
static char * close_pressed_xpm[] = {
"16 16 17 1",
" c None",
". c #2D2D2D",
"+ c #B44335",
"@ c #893C32",
"# c #3B2F2E",
"$ c #8B3D33",
"% c #AC4233",
"& c #49312E",
"* c #3C2F2D",
"= c #AD4334",
"- c #A94134",
"; c #4E322F",
"> c #A94135",
", c #AA4134",
"' c #47312E",
") c #873B32",
"! c #392E2D",
"................",
"................",
"................",
"................",
"....+@#..#@+....",
"....$+%&&%+@....",
"....*=+--+%#....",
".....;=++-&.....",
".....;=++-&.....",
"....*=+>>+%#....",
"....$+,'',+@....",
"....+)!..!)+....",
"................",
"................",
"................",
"................"};
static char *close_pressed[] = {
/* columns rows colors chars-per-pixel */
"22 25 8 1 ",
" c #2D2D2D2D2D2D",
". c #3C0F2F9A2E0F",
"X c #3C972FB02E17",
"o c #402230442E4C",
"O c #484848484848",
"+ c #A1A940293414",
"@ c #A76B4119346B",
"# c #B4B443433535",
/* pixels */
"OOOOOOOOOOOOOOOOOOOOOO",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" #+. .+# ",
" @#+.X+#+ ",
" X+#@@#+X ",
" .@##@X ",
" X@##@X ",
" X@#+@#@o ",
" +#@oo+#@ ",
" #+. X+# ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+35 -21
View File
@@ -1,22 +1,36 @@
/* XPM */
static char * hide_active_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #DCDCDC",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *hide_active[] = {
/* columns rows colors chars-per-pixel */
"22 25 5 1 ",
" c #2D2D2D2D2D2D",
". c #32B032B032B0",
"X c #484848484848",
"o c #D809D809D809",
"O c gainsboro",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXX",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ........ ",
" OOOOOOOO ",
" oooooooo ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+35 -21
View File
@@ -1,22 +1,36 @@
/* XPM */
static char * hide_inactive_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #AAAAAA",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *hide_inactive[] = {
/* columns rows colors chars-per-pixel */
"22 25 5 1 ",
" c #2D2D2D2D2D2D",
". c #300B300B300B",
"X c #393939393939",
"o c #860686068606",
"O c #888888888888",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXX",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ........ ",
" OOOOOOOO ",
" oooooooo ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+35 -21
View File
@@ -1,22 +1,36 @@
/* XPM */
static char * hide_prelight_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #D64937",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *hide_prelight[] = {
/* columns rows colors chars-per-pixel */
"22 25 5 1 ",
" c #2D2D2D2D2D2D",
". c #32802E0F2D7E",
"X c #484848484848",
"o c #D22E488336F0",
"O c #D6D649493737",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXX",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ........ ",
" OOOOOOOO ",
" oooooooo ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+35 -21
View File
@@ -1,22 +1,36 @@
/* XPM */
static char * hide_pressed_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #B44335",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *hide_pressed[] = {
/* columns rows colors chars-per-pixel */
"22 25 5 1 ",
" c #2D2D2D2D2D2D",
". c #316D2DDE2D6E",
"X c #484848484848",
"o c #B0FC42A834FD",
"O c #B4B443433535",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXX",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ........ ",
" OOOOOOOO ",
" oooooooo ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+33 -21
View File
@@ -1,22 +1,34 @@
/* XPM */
static char * maximize_active_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #DCDCDC",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................"};
static char *maximize_active[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c gainsboro",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+33 -21
View File
@@ -1,22 +1,34 @@
/* XPM */
static char * maximize_inactive_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #AAAAAA",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................"};
static char *maximize_inactive[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #393939393939",
"X c #888888888888",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+33 -21
View File
@@ -1,22 +1,34 @@
/* XPM */
static char * maximize_prelight_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #D64937",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................"};
static char *maximize_prelight[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c #D6D649493737",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+33 -21
View File
@@ -1,22 +1,34 @@
/* XPM */
static char * maximize_pressed_xpm[] = {
"16 16 3 1",
" c None",
". c #2D2D2D",
"+ c #B44335",
"................",
"................",
"................",
"................",
"....++++++++....",
"....++++++++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++....++....",
"....++++++++....",
"....++++++++....",
"................",
"................",
"................",
"................"};
static char *maximize_pressed[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c #B4B443433535",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+34
View File
@@ -0,0 +1,34 @@
/* XPM */
static char *maximize_toggled_active[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c gainsboro",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+34
View File
@@ -0,0 +1,34 @@
/* XPM */
static char *maximize_toggled_inactive[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #393939393939",
"X c #888888888888",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+34
View File
@@ -0,0 +1,34 @@
/* XPM */
static char *maximize_toggled_prelight[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c #D6D649493737",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+34
View File
@@ -0,0 +1,34 @@
/* XPM */
static char *maximize_toggled_pressed[] = {
/* columns rows colors chars-per-pixel */
"22 25 3 1 ",
" c #2D2D2D2D2D2D",
". c #484848484848",
"X c #B4B443433535",
/* pixels */
"......................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXXX ",
" XXXXXXXX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XX XX ",
" XXXXXXXX ",
" XXXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+22 -20
View File
@@ -1,21 +1,23 @@
/* XPM */
static char * menu_active_xpm[] = {
"16 16 2 1",
" c None",
". c #2D2D2D",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *menu_active[] = {
/* columns rows colors chars-per-pixel */
"22 16 1 1 ",
" c #2D2D2D2D2D2D",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+22 -20
View File
@@ -1,21 +1,23 @@
/* XPM */
static char * menu_inactive_xpm[] = {
"16 16 2 1",
" c None",
". c #2D2D2D",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *menu_inactive[] = {
/* columns rows colors chars-per-pixel */
"22 16 1 1 ",
" c #2D2D2D2D2D2D",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
+22 -20
View File
@@ -1,21 +1,23 @@
/* XPM */
static char * menu_prelight_xpm[] = {
"16 16 2 1",
" c None",
". c #2D2D2D",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................"};
static char *menu_prelight[] = {
/* columns rows colors chars-per-pixel */
"22 16 1 1 ",
" c #2D2D2D2D2D2D",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};

Some files were not shown because too many files have changed in this diff Show More