mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
New titlebar button style
This patch adds new titlebar button style. Original-patch-by: Carlos Torres <vlaadbrain@operamail.com> Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
This commit is contained in:
committed by
Carlos R. Mafra
parent
cc629f342c
commit
17cc7c3c77
@@ -41,6 +41,7 @@ typedef struct _Panel {
|
|||||||
WMFrame *titlF;
|
WMFrame *titlF;
|
||||||
WMButton *oldsB;
|
WMButton *oldsB;
|
||||||
WMButton *newsB;
|
WMButton *newsB;
|
||||||
|
WMButton *nextB;
|
||||||
|
|
||||||
WMFrame *animF;
|
WMFrame *animF;
|
||||||
WMButton *animB;
|
WMButton *animB;
|
||||||
@@ -63,6 +64,7 @@ typedef struct _Panel {
|
|||||||
#define ICON_FILE "configs"
|
#define ICON_FILE "configs"
|
||||||
#define OLDS_IMAGE "oldstyle"
|
#define OLDS_IMAGE "oldstyle"
|
||||||
#define NEWS_IMAGE "newstyle"
|
#define NEWS_IMAGE "newstyle"
|
||||||
|
#define NEXT_IMAGE "nextstyle"
|
||||||
#define ANIM_IMAGE "animations"
|
#define ANIM_IMAGE "animations"
|
||||||
#define SUPERF_IMAGE "moreanim"
|
#define SUPERF_IMAGE "moreanim"
|
||||||
#define SMOOTH_IMAGE "smooth"
|
#define SMOOTH_IMAGE "smooth"
|
||||||
@@ -74,13 +76,19 @@ static void updateLabel(WMWidget *self, void *data);
|
|||||||
|
|
||||||
static void showData(_Panel *panel)
|
static void showData(_Panel *panel)
|
||||||
{
|
{
|
||||||
|
char *str;
|
||||||
|
|
||||||
WMPerformButtonClick(panel->icoB[GetSpeedForKey("IconSlideSpeed")]);
|
WMPerformButtonClick(panel->icoB[GetSpeedForKey("IconSlideSpeed")]);
|
||||||
WMPerformButtonClick(panel->shaB[GetSpeedForKey("ShadeSpeed")]);
|
WMPerformButtonClick(panel->shaB[GetSpeedForKey("ShadeSpeed")]);
|
||||||
|
|
||||||
if (GetBoolForKey("NewStyle"))
|
str = GetStringForKey("Newstyle");
|
||||||
WMPerformButtonClick(panel->newsB);
|
if (str && strcasecmp(str, "next") == 0) {
|
||||||
else
|
WMPerformButtonClick(panel->nextB);
|
||||||
|
} else if (str && strcasecmp(str, "old") == 0) {
|
||||||
WMPerformButtonClick(panel->oldsB);
|
WMPerformButtonClick(panel->oldsB);
|
||||||
|
} else {
|
||||||
|
WMPerformButtonClick(panel->newsB);
|
||||||
|
}
|
||||||
|
|
||||||
WMSetButtonSelected(panel->animB, !GetBoolForKey("DisableAnimations"));
|
WMSetButtonSelected(panel->animB, !GetBoolForKey("DisableAnimations"));
|
||||||
WMSetButtonSelected(panel->supB, GetBoolForKey("Superfluous"));
|
WMSetButtonSelected(panel->supB, GetBoolForKey("Superfluous"));
|
||||||
@@ -287,10 +295,11 @@ static void createPanel(Panel *p)
|
|||||||
WMSetButtonImage(panel->newsB, icon);
|
WMSetButtonImage(panel->newsB, icon);
|
||||||
WMReleasePixmap(icon);
|
WMReleasePixmap(icon);
|
||||||
}
|
}
|
||||||
|
wfree(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->oldsB = WMCreateButton(panel->titlF, WBTOnOff);
|
panel->oldsB = WMCreateButton(panel->titlF, WBTOnOff);
|
||||||
WMResizeWidget(panel->oldsB, 74, 40);
|
WMResizeWidget(panel->oldsB, 37, 40);
|
||||||
WMMoveWidget(panel->oldsB, 15, 60);
|
WMMoveWidget(panel->oldsB, 15, 60);
|
||||||
WMSetButtonImagePosition(panel->oldsB, WIPImageOnly);
|
WMSetButtonImagePosition(panel->oldsB, WIPImageOnly);
|
||||||
path = LocateImage(OLDS_IMAGE);
|
path = LocateImage(OLDS_IMAGE);
|
||||||
@@ -303,7 +312,22 @@ static void createPanel(Panel *p)
|
|||||||
wfree(path);
|
wfree(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panel->nextB = WMCreateButton(panel->titlF, WBTOnOff);
|
||||||
|
WMResizeWidget(panel->nextB, 37, 40);
|
||||||
|
WMMoveWidget(panel->nextB, 52, 60);
|
||||||
|
WMSetButtonImagePosition(panel->nextB, WIPImageOnly);
|
||||||
|
path = LocateImage(NEXT_IMAGE);
|
||||||
|
if (path) {
|
||||||
|
icon = WMCreatePixmapFromFile(scr, path);
|
||||||
|
if (icon) {
|
||||||
|
WMSetButtonImage(panel->nextB, icon);
|
||||||
|
WMReleasePixmap(icon);
|
||||||
|
}
|
||||||
|
wfree(path);
|
||||||
|
}
|
||||||
|
|
||||||
WMGroupButtons(panel->newsB, panel->oldsB);
|
WMGroupButtons(panel->newsB, panel->oldsB);
|
||||||
|
WMGroupButtons(panel->newsB, panel->nextB);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->titlF);
|
WMMapSubwidgets(panel->titlF);
|
||||||
|
|
||||||
@@ -425,7 +449,13 @@ static void storeData(_Panel *panel)
|
|||||||
}
|
}
|
||||||
SetSpeedForKey(i, "ShadeSpeed");
|
SetSpeedForKey(i, "ShadeSpeed");
|
||||||
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->newsB), "NewStyle");
|
if (WMGetButtonSelected(panel->newsB)) {
|
||||||
|
SetStringForKey("new", "NewStyle");
|
||||||
|
} else if (WMGetButtonSelected(panel->oldsB)) {
|
||||||
|
SetStringForKey("old", "NewStyle");
|
||||||
|
} else {
|
||||||
|
SetStringForKey("next", "NewStyle");
|
||||||
|
}
|
||||||
SetBoolForKey(!WMGetButtonSelected(panel->animB), "DisableAnimations");
|
SetBoolForKey(!WMGetButtonSelected(panel->animB), "DisableAnimations");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->supB), "Superfluous");
|
SetBoolForKey(WMGetButtonSelected(panel->supB), "Superfluous");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->smoB), "SmoothWorkspaceBack");
|
SetBoolForKey(WMGetButtonSelected(panel->smoB), "SmoothWorkspaceBack");
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ EXTRA_DIST = \
|
|||||||
msty2.tiff \
|
msty2.tiff \
|
||||||
msty3.tiff \
|
msty3.tiff \
|
||||||
newstyle.tiff \
|
newstyle.tiff \
|
||||||
|
nextstyle.tiff \
|
||||||
nonopaque.tiff \
|
nonopaque.tiff \
|
||||||
oldstyle.tiff \
|
oldstyle.tiff \
|
||||||
opaque.tiff \
|
opaque.tiff \
|
||||||
|
|||||||
BIN
WPrefs.app/tiff/nextstyle.tiff
Normal file
BIN
WPrefs.app/tiff/nextstyle.tiff
Normal file
Binary file not shown.
Binary file not shown.
@@ -28,6 +28,7 @@ EXTRA_DIST = \
|
|||||||
msty2.xpm \
|
msty2.xpm \
|
||||||
msty3.xpm \
|
msty3.xpm \
|
||||||
newstyle.xpm \
|
newstyle.xpm \
|
||||||
|
nextstyle.xpm \
|
||||||
nonopaque.xpm \
|
nonopaque.xpm \
|
||||||
oldstyle.xpm \
|
oldstyle.xpm \
|
||||||
opaque.xpm \
|
opaque.xpm \
|
||||||
|
|||||||
120
WPrefs.app/xpm/nextstyle.xpm
Normal file
120
WPrefs.app/xpm/nextstyle.xpm
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * nextstyle_xpm[] = {
|
||||||
|
"37 33 84 1",
|
||||||
|
" c None",
|
||||||
|
". c #747474",
|
||||||
|
"+ c #757575",
|
||||||
|
"@ c #000000",
|
||||||
|
"# c #222222",
|
||||||
|
"$ c #262626",
|
||||||
|
"% c #282828",
|
||||||
|
"& c #080808",
|
||||||
|
"* c #FFFFFF",
|
||||||
|
"= c #FFFAFF",
|
||||||
|
"- c #FFFFF6",
|
||||||
|
"; c #F6F6F6",
|
||||||
|
"> c #F6F2F6",
|
||||||
|
", c #EEEEEE",
|
||||||
|
"' c #B4B6B4",
|
||||||
|
") c #8B8D94",
|
||||||
|
"! c #DEE6E6",
|
||||||
|
"~ c #E6E6EE",
|
||||||
|
"{ c #CDD2CD",
|
||||||
|
"] c #A4A1A4",
|
||||||
|
"^ c #313431",
|
||||||
|
"/ c #94918B",
|
||||||
|
"( c #EEF6F6",
|
||||||
|
"_ c #292829",
|
||||||
|
": c #C5CACD",
|
||||||
|
"< c #E6E6E6",
|
||||||
|
"[ c #A4A5AC",
|
||||||
|
"} c #414039",
|
||||||
|
"| c #948D8B",
|
||||||
|
"1 c #8B8D8B",
|
||||||
|
"2 c #292C29",
|
||||||
|
"3 c #D5D6D5",
|
||||||
|
"4 c #B4BAB4",
|
||||||
|
"5 c #313029",
|
||||||
|
"6 c #DEDADE",
|
||||||
|
"7 c #A4A5A4",
|
||||||
|
"8 c #8B898B",
|
||||||
|
"9 c #F6FAFF",
|
||||||
|
"0 c #F6FFFF",
|
||||||
|
"a c #DEDEDE",
|
||||||
|
"b c #181818",
|
||||||
|
"c c #E6EAE6",
|
||||||
|
"d c #C5C6C5",
|
||||||
|
"e c #8B8983",
|
||||||
|
"f c #EEF2F6",
|
||||||
|
"g c #EEEEF6",
|
||||||
|
"h c #101010",
|
||||||
|
"i c #201818",
|
||||||
|
"j c #838183",
|
||||||
|
"k c #838983",
|
||||||
|
"l c #949594",
|
||||||
|
"m c #202420",
|
||||||
|
"n c #CDCECD",
|
||||||
|
"o c #BDBABD",
|
||||||
|
"p c #202018",
|
||||||
|
"q c #736D73",
|
||||||
|
"r c #6A7573",
|
||||||
|
"s c #83817B",
|
||||||
|
"t c #B4B2B4",
|
||||||
|
"u c #202829",
|
||||||
|
"v c #C5C2C5",
|
||||||
|
"w c #201C18",
|
||||||
|
"x c #5A5552",
|
||||||
|
"y c #7B757B",
|
||||||
|
"z c #393C41",
|
||||||
|
"A c #CDD2D5",
|
||||||
|
"B c #D5D2D5",
|
||||||
|
"C c #9CA1A4",
|
||||||
|
"D c #BDBAB4",
|
||||||
|
"E c #8B8583",
|
||||||
|
"F c #6A6D6A",
|
||||||
|
"G c #949994",
|
||||||
|
"H c #A4AAAC",
|
||||||
|
"I c #94999C",
|
||||||
|
"J c #94958B",
|
||||||
|
"K c #94898B",
|
||||||
|
"L c #83818B",
|
||||||
|
"M c #73756A",
|
||||||
|
"N c #837D83",
|
||||||
|
"O c #060606",
|
||||||
|
"P c #070707",
|
||||||
|
"Q c #030303",
|
||||||
|
"R c #ABABAB",
|
||||||
|
"S c #535353",
|
||||||
|
"..................+++++++...........@",
|
||||||
|
"##################$$$$$$$%$%$$$$$$$$@",
|
||||||
|
"##################$$$$$$$$%%%%%%%%%%@",
|
||||||
|
"###################################%@",
|
||||||
|
"###################################%&",
|
||||||
|
"####################@@@@@@@@@@@@*%%%&",
|
||||||
|
"####################@=****-;>,'@*%%%&",
|
||||||
|
"####################@*)!=;~{]^/@*%%%&",
|
||||||
|
"####################@*(_:><[}|1@*%%%&",
|
||||||
|
"####################@**:2345678@*%%%&",
|
||||||
|
"####################@*90ab_cd/e@*%%%&",
|
||||||
|
"####################@9fg3hid7jk@*%%%&",
|
||||||
|
"####################@;almnopqrs@*%%%&",
|
||||||
|
"####################@>tuva67wxy@*%%%&",
|
||||||
|
"####################@,zABClDEbF@*%%%&",
|
||||||
|
"####################@'GHIJKeLMN@*%%%&",
|
||||||
|
"####################@@@@@@@@@@@@*%%%&",
|
||||||
|
"####################*************%%%&",
|
||||||
|
"##################$$$$$$$$$%%%%%%%%%&",
|
||||||
|
"##################$$$$$$$%$%%%%%%%%%&",
|
||||||
|
"OOOOOOOOOOOOOOOOOOPPPPPPPPPPPPP&&&&&Q",
|
||||||
|
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
|
||||||
|
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR@",
|
||||||
|
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR@",
|
||||||
|
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR@",
|
||||||
|
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR@",
|
||||||
|
"SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS*RR@",
|
||||||
|
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@R*RR@",
|
||||||
|
"********************************R*RR@",
|
||||||
|
"********************************R*RR@",
|
||||||
|
"********************************R*RR@",
|
||||||
|
"********************************R*RR@",
|
||||||
|
"********************************R*RR@"};
|
||||||
@@ -1,45 +1,51 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char * image_name[] = {
|
static char * oldstyle_xpm[] = {
|
||||||
"38 33 9 1",
|
"37 33 15 1",
|
||||||
" c #739C739C739C",
|
" c None",
|
||||||
". c #000000000000",
|
". c #747474",
|
||||||
"X c #210821082108",
|
"+ c #757575",
|
||||||
"o c #294A294A294A",
|
"@ c #000000",
|
||||||
"O c #FFFFFFFFFFFF",
|
"# c #222222",
|
||||||
"+ c #084208420842",
|
"$ c #262626",
|
||||||
"@ c #A528A528A528",
|
"% c #282828",
|
||||||
"# c #529452945294",
|
"& c #FFFFFF",
|
||||||
"$ c #AD6AAD6AAD6A",
|
"* c #080808",
|
||||||
" .",
|
"= c #A5A5A5",
|
||||||
"XXXXXXXXXXXXXXXXXXXoooooooooooooooooo.",
|
"- c #535353",
|
||||||
"XXXXXXXXXXXXXXXXXXXoooooooooooooooooo.",
|
"; c #060606",
|
||||||
"XXXXXXXXXXXXXXXXXXXoooooooooooooooooo.",
|
"> c #070707",
|
||||||
"XXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOooo+",
|
", c #030303",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@@@@@@@@@@#ooo+",
|
"' c #ABABAB",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@.#@@@@@@#.@#ooo+",
|
"..................+++++++...........@",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@#.#@@@@#.#@#ooo+",
|
"##################$$$$$$$%$%$$$$$$$$@",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@#.#@@#.#@@#ooo+",
|
"##################$$$$$$$$%%%%%%%%%%@",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@#.##.#@@@#ooo+",
|
"##################$$$$$$$%$%%%%%%%%%@",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@@#..#@@@@#ooo+",
|
"##################$&&&&&&&&&&&&&&%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@@#..#@@@@#ooo+",
|
"##################$&============-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@#.##.#@@@#ooo+",
|
"##################$&=@-======-@=-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@#.#@@#.#@@#ooo+",
|
"##################$&=-@-====-@-=-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@#.#@@@@#.#@#ooo+",
|
"##################$&==-@-==-@-==-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@.#@@@@@@#.@#ooo+",
|
"##################$&===-@--@-===-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO@@@@@@@@@@@@#ooo+",
|
"##################$&====-@@-====-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoO#############ooo+",
|
"##################$&====-@@-====-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoooooooooooooooooo+",
|
"##################$&===-@--@-===-%%%*",
|
||||||
"XXXXXXXXXXXXXXXXXXXoooooooooooooooooo+",
|
"##################$&==-@-==-@-==-%%%*",
|
||||||
"+++++++++++++++++++++++++++++++++++++.",
|
"##################$&=-@-====-@-=-%%%*",
|
||||||
"......................................",
|
"##################$&=@-======-@=-%%%*",
|
||||||
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
|
"##################$&============-%%%*",
|
||||||
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
|
"##################$&-------------%%%*",
|
||||||
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
|
"##################$$$$$$$$$%%%%%%%%%*",
|
||||||
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
|
"##################$$$$$$$%$%%%%%%%%%*",
|
||||||
"##################################O$$.",
|
";;;;;;;;;;;;;;;;;;>>>>>>>>>>>>>*****,",
|
||||||
".................................$O$$.",
|
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
|
||||||
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$O$$.",
|
"''''''''''''''''''''''''''''''''''''@",
|
||||||
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$O$$.",
|
"''''''''''''''''''''''''''''''''''''@",
|
||||||
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$O$$.",
|
"''''''''''''''''''''''''''''''''''''@",
|
||||||
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$O$$.",
|
"''''''''''''''''''''''''''''''''''''@",
|
||||||
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$O$$."};
|
"---------------------------------&''@",
|
||||||
|
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'&''@",
|
||||||
|
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&''@",
|
||||||
|
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&''@",
|
||||||
|
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&''@",
|
||||||
|
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&''@",
|
||||||
|
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&''@"};
|
||||||
|
|||||||
@@ -228,6 +228,10 @@ typedef enum {
|
|||||||
#define WD_BOTTOMLEFT 6
|
#define WD_BOTTOMLEFT 6
|
||||||
#define WD_BOTTOMRIGHT 7
|
#define WD_BOTTOMRIGHT 7
|
||||||
|
|
||||||
|
/* titlebar style */
|
||||||
|
#define TS_NEW 0
|
||||||
|
#define TS_OLD 1
|
||||||
|
#define TS_NEXT 2
|
||||||
|
|
||||||
/* workspace border position */
|
/* workspace border position */
|
||||||
#define WB_NONE 0
|
#define WB_NONE 0
|
||||||
|
|||||||
@@ -97,6 +97,272 @@ static char *PRED_ICONIFY_XPM[] = {
|
|||||||
".........."
|
".........."
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char *NEXT_CLOSE_XPM[] = {
|
||||||
|
"10 10 69 1",
|
||||||
|
" c None",
|
||||||
|
". c #FBFBFB",
|
||||||
|
"+ c #F9F9F9",
|
||||||
|
"@ c #F7F7F7",
|
||||||
|
"# c #F4F4F4",
|
||||||
|
"$ c #F0F0F0",
|
||||||
|
"% c #EDEDED",
|
||||||
|
"& c #E8E8E8",
|
||||||
|
"* c #AFAFAF",
|
||||||
|
"= c #FCFCFC",
|
||||||
|
"- c #8B8B8B",
|
||||||
|
"; c #DEDEDE",
|
||||||
|
"> c #E0E0E0",
|
||||||
|
", c #C7C7C7",
|
||||||
|
"' c #999999",
|
||||||
|
") c #2B2B2B",
|
||||||
|
"! c #878787",
|
||||||
|
"~ c #F1F1F1",
|
||||||
|
"{ c #222222",
|
||||||
|
"] c #C2C2C2",
|
||||||
|
"^ c #EBEBEB",
|
||||||
|
"/ c #DCDCDC",
|
||||||
|
"( c #9F9F9F",
|
||||||
|
"_ c #363636",
|
||||||
|
": c #FEFEFE",
|
||||||
|
"< c #C1C1C1",
|
||||||
|
"[ c #232323",
|
||||||
|
"} c #CFCFCF",
|
||||||
|
"| c #282828",
|
||||||
|
"1 c #D5D5D5",
|
||||||
|
"2 c #FAFAFA",
|
||||||
|
"3 c #F6F6F6",
|
||||||
|
"4 c #D3D3D3",
|
||||||
|
"5 c #121212",
|
||||||
|
"6 c #BEBEBE",
|
||||||
|
"7 c #898989",
|
||||||
|
"8 c #838383",
|
||||||
|
"9 c #EEEEEE",
|
||||||
|
"0 c #E9E9E9",
|
||||||
|
"a c #CDCDCD",
|
||||||
|
"b c #080808",
|
||||||
|
"c c #131313",
|
||||||
|
"d c #A1A1A1",
|
||||||
|
"e c #7F7F7F",
|
||||||
|
"f c #808080",
|
||||||
|
"g c #D9D9D9",
|
||||||
|
"h c #8D8D8D",
|
||||||
|
"i c #1D1D1D",
|
||||||
|
"j c #C9C9C9",
|
||||||
|
"k c #B4B4B4",
|
||||||
|
"l c #191919",
|
||||||
|
"m c #6A6A6A",
|
||||||
|
"n c #6C6C6C",
|
||||||
|
"o c #7A7A7A",
|
||||||
|
"p c #B1B1B1",
|
||||||
|
"q c #202020",
|
||||||
|
"r c #BBBBBB",
|
||||||
|
"s c #D4D4D4",
|
||||||
|
"t c #151515",
|
||||||
|
"u c #515151",
|
||||||
|
"v c #747474",
|
||||||
|
"w c #3A3A3A",
|
||||||
|
"x c #CCCCCC",
|
||||||
|
"y c #B3B3B3",
|
||||||
|
"z c #939393",
|
||||||
|
"A c #A3A3A3",
|
||||||
|
"B c #919191",
|
||||||
|
"C c #858585",
|
||||||
|
"D c #7C7C7C",
|
||||||
|
"...+@#$%&*",
|
||||||
|
"=-;#%>,')!",
|
||||||
|
"=~{]^/(_!!",
|
||||||
|
"=:<[}*|1(!",
|
||||||
|
"2@345[>678",
|
||||||
|
"@90abc6def",
|
||||||
|
"#ghijklmno",
|
||||||
|
"~pqrgs(tuv",
|
||||||
|
"%wxx'-p8tn",
|
||||||
|
"yzAB7C8enD"};
|
||||||
|
|
||||||
|
|
||||||
|
static char *NEXT_BROKEN_CLOSE_XPM[] = {
|
||||||
|
"10 10 8 1",
|
||||||
|
" c None",
|
||||||
|
". c #E0E0E0",
|
||||||
|
"+ c #7D7D7D",
|
||||||
|
"@ c #DBDBDB",
|
||||||
|
"# c #BDBDBD",
|
||||||
|
"$ c #080808",
|
||||||
|
"% c #363636",
|
||||||
|
"& c #D4D4D4",
|
||||||
|
".........+",
|
||||||
|
".+@...#+$+",
|
||||||
|
"..$#.@+%++",
|
||||||
|
"..###++&++",
|
||||||
|
"...&...#++",
|
||||||
|
"...&..#+++",
|
||||||
|
".@+##+%%%+",
|
||||||
|
".+$#@&+$%%",
|
||||||
|
".%##++++$%",
|
||||||
|
"++++++++%+"};
|
||||||
|
|
||||||
|
static char *NEXT_KILL_XPM[] = {
|
||||||
|
"10 10 64 1",
|
||||||
|
" c None",
|
||||||
|
". c #FBFBFB",
|
||||||
|
"+ c #FAFAFA",
|
||||||
|
"@ c #F7F7F7",
|
||||||
|
"# c #F5F5F5",
|
||||||
|
"$ c #F6F6F6",
|
||||||
|
"% c #EEEEEE",
|
||||||
|
"& c #B3B3B3",
|
||||||
|
"* c #FCFCFC",
|
||||||
|
"= c #8B8B8B",
|
||||||
|
"- c #E3E3E3",
|
||||||
|
"; c #F4F4F4",
|
||||||
|
"> c #ECECEC",
|
||||||
|
", c #EAEAEA",
|
||||||
|
"' c #BFBFBF",
|
||||||
|
") c #474747",
|
||||||
|
"! c #A5A5A5",
|
||||||
|
"~ c #EFEFEF",
|
||||||
|
"{ c #262626",
|
||||||
|
"] c #B6B6B6",
|
||||||
|
"^ c #B4B4B4",
|
||||||
|
"/ c #282828",
|
||||||
|
"( c #A3A3A3",
|
||||||
|
"_ c #FEFEFE",
|
||||||
|
": c #E0E0E0",
|
||||||
|
"< c #B8B8B8",
|
||||||
|
"[ c #C5C5C5",
|
||||||
|
"} c #DCDCDC",
|
||||||
|
"| c #D3D3D3",
|
||||||
|
"1 c #E4E4E4",
|
||||||
|
"2 c #B1B1B1",
|
||||||
|
"3 c #878787",
|
||||||
|
"4 c #D5D5D5",
|
||||||
|
"5 c #202020",
|
||||||
|
"6 c #222222",
|
||||||
|
"7 c #F1F1F1",
|
||||||
|
"8 c #959595",
|
||||||
|
"9 c #838383",
|
||||||
|
"0 c #DBDBDB",
|
||||||
|
"a c #252525",
|
||||||
|
"b c #E9E9E9",
|
||||||
|
"c c #F0F0F0",
|
||||||
|
"d c #999999",
|
||||||
|
"e c #808080",
|
||||||
|
"f c #9B9B9B",
|
||||||
|
"g c #C2C2C2",
|
||||||
|
"h c #7C7C7C",
|
||||||
|
"i c #7A7A7A",
|
||||||
|
"j c #232323",
|
||||||
|
"k c #CCCCCC",
|
||||||
|
"l c #C1C1C1",
|
||||||
|
"m c #181818",
|
||||||
|
"n c #404040",
|
||||||
|
"o c #747474",
|
||||||
|
"p c #E7E7E7",
|
||||||
|
"q c #303030",
|
||||||
|
"r c #C9C9C9",
|
||||||
|
"s c #ACACAC",
|
||||||
|
"t c #787878",
|
||||||
|
"u c #141414",
|
||||||
|
"v c #6C6C6C",
|
||||||
|
"w c #8F8F8F",
|
||||||
|
"x c #858585",
|
||||||
|
"y c #7F7F7F",
|
||||||
|
"...+@#$$%&",
|
||||||
|
"*=-+;>,')!",
|
||||||
|
"*~{];#^/((",
|
||||||
|
"*_:<[}|123",
|
||||||
|
"+@+456;789",
|
||||||
|
"@~706abcde",
|
||||||
|
"#0fg#$3ehi",
|
||||||
|
"c=jk>%lmno",
|
||||||
|
"pqr}s(^tuv",
|
||||||
|
"2w!d=x9yvh"};
|
||||||
|
|
||||||
|
static char *NEXT_ICONIFY_XPM[] = {
|
||||||
|
"10 10 72 1",
|
||||||
|
" c None",
|
||||||
|
". c #FCFCFC",
|
||||||
|
"+ c #FAFAFA",
|
||||||
|
"@ c #F8F8F8",
|
||||||
|
"# c #F6F6F6",
|
||||||
|
"$ c #F2F2F2",
|
||||||
|
"% c #EFEFEF",
|
||||||
|
"& c #EAEAEA",
|
||||||
|
"* c #A6A6A6",
|
||||||
|
"= c #FEFEFE",
|
||||||
|
"- c #FDFDFD",
|
||||||
|
"; c #F9F9F9",
|
||||||
|
"> c #E2E2E2",
|
||||||
|
", c #CBCBCB",
|
||||||
|
"' c #AFAFAF",
|
||||||
|
") c #808080",
|
||||||
|
"! c #717171",
|
||||||
|
"~ c #FFFFFF",
|
||||||
|
"{ c #FBFBFB",
|
||||||
|
"] c #F1F1F1",
|
||||||
|
"^ c #E5E5E5",
|
||||||
|
"/ c #CCCCCC",
|
||||||
|
"( c #838383",
|
||||||
|
"_ c #A0A0A0",
|
||||||
|
": c #989898",
|
||||||
|
"< c #8B8B8B",
|
||||||
|
"[ c #7F7F7F",
|
||||||
|
"} c #E8E8E8",
|
||||||
|
"| c #ADADAD",
|
||||||
|
"1 c #181818",
|
||||||
|
"2 c #171717",
|
||||||
|
"3 c #161616",
|
||||||
|
"4 c #141414",
|
||||||
|
"5 c #0A0A0A",
|
||||||
|
"6 c #000000",
|
||||||
|
"7 c #A2A2A2",
|
||||||
|
"8 c #747474",
|
||||||
|
"9 c #6C6C6C",
|
||||||
|
"0 c #F0F0F0",
|
||||||
|
"a c #B9B9B9",
|
||||||
|
"b c #B7B7B7",
|
||||||
|
"c c #B1B1B1",
|
||||||
|
"d c #868686",
|
||||||
|
"e c #020202",
|
||||||
|
"f c #EDEDED",
|
||||||
|
"g c #939393",
|
||||||
|
"h c #676767",
|
||||||
|
"i c #696969",
|
||||||
|
"j c #8E8E8E",
|
||||||
|
"k c #787878",
|
||||||
|
"l c #757575",
|
||||||
|
"m c #777777",
|
||||||
|
"n c #767676",
|
||||||
|
"o c #EBEBEB",
|
||||||
|
"p c #525252",
|
||||||
|
"q c #626262",
|
||||||
|
"r c #F3F3F3",
|
||||||
|
"s c #E1E1E1",
|
||||||
|
"t c #B5B5B5",
|
||||||
|
"u c #5F5F5F",
|
||||||
|
"v c #424242",
|
||||||
|
"w c #5B5B5B",
|
||||||
|
"x c #9D9D9D",
|
||||||
|
"y c #969696",
|
||||||
|
"z c #E4E4E4",
|
||||||
|
"A c #444444",
|
||||||
|
"B c #2E2E2E",
|
||||||
|
"C c #A9A9A9",
|
||||||
|
"D c #7C7C7C",
|
||||||
|
"E c #797979",
|
||||||
|
"F c #5D5D5D",
|
||||||
|
"G c #646464",
|
||||||
|
"...+@#$%&*",
|
||||||
|
".=-;%>,')!",
|
||||||
|
"-~={]^/'(!",
|
||||||
|
"_'*:<[}|)!",
|
||||||
|
"123456%789",
|
||||||
|
"0abcdefghi",
|
||||||
|
"jklmneonpq",
|
||||||
|
"rs^>te}uvw",
|
||||||
|
"f_xy9ezABp",
|
||||||
|
"CDDEue7FpG"};
|
||||||
|
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
#include "extend_pixmaps.h"
|
#include "extend_pixmaps.h"
|
||||||
#endif /* XKB_BUTTON_HINT */
|
#endif /* XKB_BUTTON_HINT */
|
||||||
|
|||||||
@@ -185,6 +185,11 @@ static WOptionEnumeration seFocusModes[] = {
|
|||||||
{NULL, 0, 0}
|
{NULL, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static WOptionEnumeration seTitlebarModes[] = {
|
||||||
|
{"new", TS_NEW, 0}, {"old", TS_OLD, 0},
|
||||||
|
{"next", TS_NEXT, 0}, {NULL, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
static WOptionEnumeration seColormapModes[] = {
|
static WOptionEnumeration seColormapModes[] = {
|
||||||
{"Manual", WCM_CLICK, 0}, {"ClickToFocus", WCM_CLICK, 1},
|
{"Manual", WCM_CLICK, 0}, {"ClickToFocus", WCM_CLICK, 1},
|
||||||
{"Auto", WCM_POINTER, 0}, {"FocusFollowMouse", WCM_POINTER, 1},
|
{"Auto", WCM_POINTER, 0}, {"FocusFollowMouse", WCM_POINTER, 1},
|
||||||
@@ -311,8 +316,8 @@ WDefaultEntry staticOptionList[] = {
|
|||||||
&wPreferences.disable_root_mouse, getBool, NULL, NULL, NULL},
|
&wPreferences.disable_root_mouse, getBool, NULL, NULL, NULL},
|
||||||
{"FocusMode", "manual", seFocusModes, /* have a problem when switching from */
|
{"FocusMode", "manual", seFocusModes, /* have a problem when switching from */
|
||||||
&wPreferences.focus_mode, getEnum, NULL, NULL, NULL}, /* manual to sloppy without restart */
|
&wPreferences.focus_mode, getEnum, NULL, NULL, NULL}, /* manual to sloppy without restart */
|
||||||
{"NewStyle", "NO", NULL,
|
{"NewStyle", "new", seTitlebarModes,
|
||||||
&wPreferences.new_style, getBool, NULL, NULL, NULL},
|
&wPreferences.new_style, getEnum, NULL, NULL, NULL},
|
||||||
{"DisableDock", "NO", (void *)WM_DOCK,
|
{"DisableDock", "NO", (void *)WM_DOCK,
|
||||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||||
{"DisableClip", "NO", (void *)WM_CLIP,
|
{"DisableClip", "NO", (void *)WM_CLIP,
|
||||||
|
|||||||
@@ -113,5 +113,79 @@ static char *PRED_XKBGROUP4_XPM[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *NEXT_XKBGROUP1_XPM[] = {
|
||||||
|
"10 10 6 1",
|
||||||
|
" c None",
|
||||||
|
". c #E0E0E0",
|
||||||
|
"+ c #7D7D7D",
|
||||||
|
"@ c #363636",
|
||||||
|
"# c #080808",
|
||||||
|
"$ c #BDBDBD",
|
||||||
|
".........+",
|
||||||
|
"..@@@@@@++",
|
||||||
|
"..@####+++",
|
||||||
|
"..#+$$$$++",
|
||||||
|
"..###+.$++",
|
||||||
|
"..#++..$++",
|
||||||
|
"..#$.$$$++",
|
||||||
|
"..#@@@@+++",
|
||||||
|
".$+#####@@",
|
||||||
|
"+++++++@@@"};
|
||||||
|
|
||||||
|
static char *NEXT_XKBGROUP2_XPM[] = {
|
||||||
|
"10 10 6 1",
|
||||||
|
" c None",
|
||||||
|
". c #E0E0E0",
|
||||||
|
"+ c #7D7D7D",
|
||||||
|
"@ c #BDBDBD",
|
||||||
|
"# c #080808",
|
||||||
|
"$ c #363636",
|
||||||
|
".........+",
|
||||||
|
".@##@@$#++",
|
||||||
|
".#.+#+###+",
|
||||||
|
".#+######+",
|
||||||
|
".########+",
|
||||||
|
"..######++",
|
||||||
|
"..@####+++",
|
||||||
|
".@@@#$++++",
|
||||||
|
".@++#$++$$",
|
||||||
|
"+++++++$$$"};
|
||||||
|
|
||||||
|
static char *NEXT_XKBGROUP3_XPM[] = {
|
||||||
|
"10 10 6 1",
|
||||||
|
" c None",
|
||||||
|
". c #E0E0E0",
|
||||||
|
"+ c #7D7D7D",
|
||||||
|
"@ c #BDBDBD",
|
||||||
|
"# c #080808",
|
||||||
|
"$ c #363636",
|
||||||
|
".........+",
|
||||||
|
"..@####.++",
|
||||||
|
".@######.+",
|
||||||
|
".#.+##.+#+",
|
||||||
|
".#++##++#+",
|
||||||
|
".########+",
|
||||||
|
".##@##@##+",
|
||||||
|
".+##@@##$+",
|
||||||
|
".@+####$$$",
|
||||||
|
"+++++++$$$"};
|
||||||
|
|
||||||
|
static char *NEXT_XKBGROUP4_XPM[] = {
|
||||||
|
"10 10 6 1",
|
||||||
|
" c None",
|
||||||
|
". c #E0E0E0",
|
||||||
|
"+ c #7D7D7D",
|
||||||
|
"@ c #BDBDBD",
|
||||||
|
"# c #080808",
|
||||||
|
"$ c #363636",
|
||||||
|
".........+",
|
||||||
|
"..@####.++",
|
||||||
|
".@#@@@@#.+",
|
||||||
|
".##$@@#$#+",
|
||||||
|
".#$$@@$$#+",
|
||||||
|
".#@@@@++#+",
|
||||||
|
".#+#++#.#+",
|
||||||
|
".+#+##$#$+",
|
||||||
|
".@+####$$$",
|
||||||
|
"+++++++$$$"};
|
||||||
|
|
||||||
|
|||||||
100
src/framewin.c
100
src/framewin.c
@@ -127,10 +127,12 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
else
|
else
|
||||||
theight = 0;
|
theight = 0;
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
bsize = theight;
|
bsize = theight;
|
||||||
} else {
|
} else if (wPreferences.new_style == TS_OLD) {
|
||||||
bsize = theight - 7;
|
bsize = theight - 7;
|
||||||
|
} else {
|
||||||
|
bsize = theight - 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fwin->titlebar) {
|
if (fwin->titlebar) {
|
||||||
@@ -141,7 +143,7 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
|
|
||||||
fwin->flags.need_texture_remake = 1;
|
fwin->flags.need_texture_remake = 1;
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->left_button) {
|
if (fwin->left_button) {
|
||||||
wCoreConfigure(fwin->left_button, 0, 0, bsize, bsize);
|
wCoreConfigure(fwin->left_button, 0, 0, bsize, bsize);
|
||||||
}
|
}
|
||||||
@@ -180,7 +182,7 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
/* we had a titlebar, but now we don't need it anymore */
|
/* we had a titlebar, but now we don't need it anymore */
|
||||||
for (i = 0; i < (fwin->flags.single_texture ? 1 : 3); i++) {
|
for (i = 0; i < (fwin->flags.single_texture ? 1 : 3); i++) {
|
||||||
FREE_PIXMAP(fwin->title_back[i]);
|
FREE_PIXMAP(fwin->title_back[i]);
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
FREE_PIXMAP(fwin->lbutton_back[i]);
|
FREE_PIXMAP(fwin->lbutton_back[i]);
|
||||||
FREE_PIXMAP(fwin->rbutton_back[i]);
|
FREE_PIXMAP(fwin->rbutton_back[i]);
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -218,14 +220,14 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
|
|
||||||
if (flags & WFF_LEFT_BUTTON) {
|
if (flags & WFF_LEFT_BUTTON) {
|
||||||
fwin->flags.left_button = 1;
|
fwin->flags.left_button = 1;
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
fwin->left_button = wCoreCreate(fwin->core, 0, 0, bsize, bsize);
|
fwin->left_button = wCoreCreate(fwin->core, 0, 0, bsize, bsize);
|
||||||
if (width < theight * 4) {
|
if (width < theight * 4) {
|
||||||
fwin->flags.lbutton_dont_fit = 1;
|
fwin->flags.lbutton_dont_fit = 1;
|
||||||
} else {
|
} else {
|
||||||
XMapRaised(dpy, fwin->left_button->window);
|
XMapRaised(dpy, fwin->left_button->window);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (wPreferences.new_style == TS_OLD) {
|
||||||
fwin->left_button =
|
fwin->left_button =
|
||||||
wCoreCreate(fwin->titlebar, 3, (theight - bsize) / 2, bsize, bsize);
|
wCoreCreate(fwin->titlebar, 3, (theight - bsize) / 2, bsize, bsize);
|
||||||
|
|
||||||
@@ -237,12 +239,25 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
} else {
|
} else {
|
||||||
XMapRaised(dpy, fwin->left_button->window);
|
XMapRaised(dpy, fwin->left_button->window);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fwin->left_button =
|
||||||
|
wCoreCreate(fwin->titlebar, 3, (theight-bsize)/2,
|
||||||
|
bsize, bsize);
|
||||||
|
|
||||||
|
XSetWindowBackground(dpy, fwin->left_button->window,
|
||||||
|
scr->widget_texture->dark.pixel);
|
||||||
|
|
||||||
|
if (width < theight*3) {
|
||||||
|
fwin->flags.lbutton_dont_fit = 1;
|
||||||
|
} else {
|
||||||
|
XMapRaised(dpy, fwin->left_button->window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
if (flags & WFF_LANGUAGE_BUTTON) {
|
if (flags & WFF_LANGUAGE_BUTTON) {
|
||||||
fwin->flags.language_button = 1;
|
fwin->flags.language_button = 1;
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
fwin->language_button = wCoreCreate(fwin->core, bsize, 0, bsize, bsize);
|
fwin->language_button = wCoreCreate(fwin->core, bsize, 0, bsize, bsize);
|
||||||
|
|
||||||
if (width < theight * 4) {
|
if (width < theight * 4) {
|
||||||
@@ -269,15 +284,21 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
|
|
||||||
if (flags & WFF_RIGHT_BUTTON) {
|
if (flags & WFF_RIGHT_BUTTON) {
|
||||||
fwin->flags.right_button = 1;
|
fwin->flags.right_button = 1;
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
fwin->right_button =
|
fwin->right_button =
|
||||||
wCoreCreate(fwin->core, width - bsize + 1, 0, bsize, bsize);
|
wCoreCreate(fwin->core, width - bsize + 1, 0, bsize, bsize);
|
||||||
} else {
|
} else if (wPreferences.new_style == TS_OLD) {
|
||||||
fwin->right_button =
|
fwin->right_button =
|
||||||
wCoreCreate(fwin->titlebar, width - bsize - 3,
|
wCoreCreate(fwin->titlebar, width - bsize - 3,
|
||||||
(theight - bsize) / 2, bsize, bsize);
|
(theight - bsize) / 2, bsize, bsize);
|
||||||
XSetWindowBackground(dpy, fwin->right_button->window,
|
XSetWindowBackground(dpy, fwin->right_button->window,
|
||||||
scr->widget_texture->normal.pixel);
|
scr->widget_texture->normal.pixel);
|
||||||
|
} else {
|
||||||
|
fwin->right_button =
|
||||||
|
wCoreCreate(fwin->titlebar, width-bsize-3,
|
||||||
|
(theight-bsize)/2, bsize, bsize);
|
||||||
|
XSetWindowBackground(dpy, fwin->right_button->window,
|
||||||
|
scr->widget_texture->dark.pixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (width < theight * 2) {
|
if (width < theight * 2) {
|
||||||
@@ -287,7 +308,7 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wPreferences.new_style)
|
if (wPreferences.new_style == TS_NEW)
|
||||||
updateTitlebar(fwin);
|
updateTitlebar(fwin);
|
||||||
|
|
||||||
XMapRaised(dpy, fwin->titlebar->window);
|
XMapRaised(dpy, fwin->titlebar->window);
|
||||||
@@ -412,7 +433,7 @@ void wFrameWindowDestroy(WFrameWindow * fwin)
|
|||||||
|
|
||||||
for (i = 0; i < (fwin->flags.single_texture ? 1 : 3); i++) {
|
for (i = 0; i < (fwin->flags.single_texture ? 1 : 3); i++) {
|
||||||
FREE_PIXMAP(fwin->title_back[i]);
|
FREE_PIXMAP(fwin->title_back[i]);
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
FREE_PIXMAP(fwin->lbutton_back[i]);
|
FREE_PIXMAP(fwin->lbutton_back[i]);
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
FREE_PIXMAP(fwin->languagebutton_back[i]);
|
FREE_PIXMAP(fwin->languagebutton_back[i]);
|
||||||
@@ -445,7 +466,7 @@ static void updateTitlebar(WFrameWindow * fwin)
|
|||||||
x = 0;
|
x = 0;
|
||||||
w = fwin->core->width + 1;
|
w = fwin->core->width + 1;
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->flags.hide_left_button || !fwin->left_button || fwin->flags.lbutton_dont_fit) {
|
if (fwin->flags.hide_left_button || !fwin->left_button || fwin->flags.lbutton_dont_fit) {
|
||||||
x = 0;
|
x = 0;
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -487,13 +508,13 @@ static void updateTitlebar(WFrameWindow * fwin)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (!fwin->flags.hide_right_button && fwin->right_button && !fwin->flags.rbutton_dont_fit) {
|
if (!fwin->flags.hide_right_button && fwin->right_button && !fwin->flags.rbutton_dont_fit) {
|
||||||
w -= fwin->right_button->width;
|
w -= fwin->right_button->width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wPreferences.new_style || fwin->titlebar->width != w)
|
if (wPreferences.new_style == TS_NEW || fwin->titlebar->width != w)
|
||||||
fwin->flags.need_texture_remake = 1;
|
fwin->flags.need_texture_remake = 1;
|
||||||
|
|
||||||
wCoreConfigure(fwin->titlebar, x, 0, w, theight);
|
wCoreConfigure(fwin->titlebar, x, 0, w, theight);
|
||||||
@@ -518,7 +539,7 @@ void wFrameWindowHideButton(WFrameWindow * fwin, int flags)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fwin->titlebar) {
|
if (fwin->titlebar) {
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
updateTitlebar(fwin);
|
updateTitlebar(fwin);
|
||||||
} else {
|
} else {
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -560,7 +581,7 @@ void wFrameWindowShowButton(WFrameWindow * fwin, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fwin->titlebar) {
|
if (fwin->titlebar) {
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
updateTitlebar(fwin);
|
updateTitlebar(fwin);
|
||||||
} else {
|
} else {
|
||||||
XClearWindow(dpy, fwin->titlebar->window);
|
XClearWindow(dpy, fwin->titlebar->window);
|
||||||
@@ -600,7 +621,7 @@ renderTexture(WScreen * scr, WTexture * texture, int width, int height,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (left) {
|
if (left) {
|
||||||
limg = RGetSubImage(img, 0, 0, bwidth, bheight);
|
limg = RGetSubImage(img, 0, 0, bwidth, bheight);
|
||||||
} else
|
} else
|
||||||
@@ -731,7 +752,7 @@ static void updateTexture(WFrameWindow * fwin)
|
|||||||
if (fwin->titlebar) {
|
if (fwin->titlebar) {
|
||||||
if (fwin->title_texture[i]->any.type != WTEX_SOLID) {
|
if (fwin->title_texture[i]->any.type != WTEX_SOLID) {
|
||||||
XSetWindowBackgroundPixmap(dpy, fwin->titlebar->window, fwin->title_back[i]);
|
XSetWindowBackgroundPixmap(dpy, fwin->titlebar->window, fwin->title_back[i]);
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->left_button && fwin->lbutton_back[i])
|
if (fwin->left_button && fwin->lbutton_back[i])
|
||||||
XSetWindowBackgroundPixmap(dpy, fwin->left_button->window,
|
XSetWindowBackgroundPixmap(dpy, fwin->left_button->window,
|
||||||
fwin->lbutton_back[i]);
|
fwin->lbutton_back[i]);
|
||||||
@@ -750,7 +771,7 @@ static void updateTexture(WFrameWindow * fwin)
|
|||||||
} else {
|
} else {
|
||||||
pixel = fwin->title_texture[i]->solid.normal.pixel;
|
pixel = fwin->title_texture[i]->solid.normal.pixel;
|
||||||
XSetWindowBackground(dpy, fwin->titlebar->window, pixel);
|
XSetWindowBackground(dpy, fwin->titlebar->window, pixel);
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->left_button)
|
if (fwin->left_button)
|
||||||
XSetWindowBackground(dpy, fwin->left_button->window, pixel);
|
XSetWindowBackground(dpy, fwin->left_button->window, pixel);
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -789,7 +810,7 @@ static void remakeTexture(WFrameWindow * fwin, int state)
|
|||||||
|
|
||||||
if (fwin->title_texture[state] && fwin->titlebar) {
|
if (fwin->title_texture[state] && fwin->titlebar) {
|
||||||
FREE_PIXMAP(fwin->title_back[state]);
|
FREE_PIXMAP(fwin->title_back[state]);
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
FREE_PIXMAP(fwin->lbutton_back[state]);
|
FREE_PIXMAP(fwin->lbutton_back[state]);
|
||||||
FREE_PIXMAP(fwin->rbutton_back[state]);
|
FREE_PIXMAP(fwin->rbutton_back[state]);
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -828,7 +849,7 @@ static void remakeTexture(WFrameWindow * fwin, int state)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fwin->title_back[state] = pmap;
|
fwin->title_back[state] = pmap;
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
fwin->lbutton_back[state] = lpmap;
|
fwin->lbutton_back[state] = lpmap;
|
||||||
fwin->rbutton_back[state] = rpmap;
|
fwin->rbutton_back[state] = rpmap;
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
@@ -947,7 +968,7 @@ void wFrameWindowPaint(WFrameWindow * fwin)
|
|||||||
int titlelen;
|
int titlelen;
|
||||||
int allButtons = 1;
|
int allButtons = 1;
|
||||||
|
|
||||||
if (!wPreferences.new_style) {
|
if (!wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
||||||
lofs += fwin->left_button->width + 3;
|
lofs += fwin->left_button->width + 3;
|
||||||
else
|
else
|
||||||
@@ -1041,7 +1062,7 @@ void wFrameWindowPaint(WFrameWindow * fwin)
|
|||||||
|
|
||||||
static void reconfigure(WFrameWindow * fwin, int x, int y, int width, int height, Bool dontMove)
|
static void reconfigure(WFrameWindow * fwin, int x, int y, int width, int height, Bool dontMove)
|
||||||
{
|
{
|
||||||
int k = (wPreferences.new_style ? 4 : 3);
|
int k = (wPreferences.new_style == TS_NEW ? 4 : 3);
|
||||||
int resizedHorizontally = 0;
|
int resizedHorizontally = 0;
|
||||||
|
|
||||||
if (dontMove)
|
if (dontMove)
|
||||||
@@ -1115,7 +1136,7 @@ static void reconfigure(WFrameWindow * fwin, int x, int y, int width, int height
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->right_button)
|
if (fwin->right_button)
|
||||||
XMoveWindow(dpy, fwin->right_button->window,
|
XMoveWindow(dpy, fwin->right_button->window,
|
||||||
width - fwin->right_button->width + 1, 0);
|
width - fwin->right_button->width + 1, 0);
|
||||||
@@ -1217,7 +1238,7 @@ static void checkTitleSize(WFrameWindow * fwin)
|
|||||||
width = fwin->titlebar->width - 6 - 6;
|
width = fwin->titlebar->width - 6 - 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wPreferences.new_style) {
|
if (!wPreferences.new_style == TS_NEW) {
|
||||||
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
||||||
width -= fwin->left_button->width + 3;
|
width -= fwin->left_button->width + 3;
|
||||||
|
|
||||||
@@ -1257,16 +1278,24 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
XSetClipMask(dpy, copy_gc, None);
|
XSetClipMask(dpy, copy_gc, None);
|
||||||
XSetForeground(dpy, copy_gc, scr->white_pixel);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
|
} else {
|
||||||
|
XSetForeground(dpy, copy_gc, scr->white_pixel);
|
||||||
|
}
|
||||||
d = 1;
|
d = 1;
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width - 1, button->height - 1);
|
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width - 1, button->height - 1);
|
||||||
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
XDrawRectangle(dpy, button->window, copy_gc, 0, 0, button->width - 1, button->height - 1);
|
XDrawRectangle(dpy, button->window, copy_gc, 0, 0, button->width - 1, button->height - 1);
|
||||||
} else {
|
} else if (wPreferences.new_style == TS_OLD) {
|
||||||
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width, button->height);
|
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width, button->height);
|
||||||
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
XDrawRectangle(dpy, button->window, copy_gc, 0, 0, button->width, button->height);
|
XDrawRectangle(dpy, button->window, copy_gc, 0, 0, button->width, button->height);
|
||||||
|
} else {
|
||||||
|
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width-3, button->height-3);
|
||||||
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
|
XDrawRectangle(dpy, button->window, copy_gc, 0, 0, button->width-3, button->height-3);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XClearWindow(dpy, button->window);
|
XClearWindow(dpy, button->window);
|
||||||
@@ -1279,7 +1308,7 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long
|
|||||||
}
|
}
|
||||||
d = 0;
|
d = 0;
|
||||||
|
|
||||||
if (wPreferences.new_style) {
|
if (wPreferences.new_style == TS_NEW) {
|
||||||
if (texture->any.type == WTEX_SOLID || pushed) {
|
if (texture->any.type == WTEX_SOLID || pushed) {
|
||||||
wDrawBevel(button->window, button->width, button->height,
|
wDrawBevel(button->window, button->width, button->height,
|
||||||
(WTexSolid *) texture, WREL_RAISED);
|
(WTexSolid *) texture, WREL_RAISED);
|
||||||
@@ -1296,7 +1325,7 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long
|
|||||||
x = (button->width - width) / 2 + d;
|
x = (button->width - width) / 2 + d;
|
||||||
y = (button->height - image->height) / 2 + d;
|
y = (button->height - image->height) / 2 + d;
|
||||||
XSetClipOrigin(dpy, copy_gc, x - left, y);
|
XSetClipOrigin(dpy, copy_gc, x - left, y);
|
||||||
if (!wPreferences.new_style) {
|
if (!wPreferences.new_style == TS_NEW) {
|
||||||
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
if (!pushed) {
|
if (!pushed) {
|
||||||
if (image->depth == 1)
|
if (image->depth == 1)
|
||||||
@@ -1306,8 +1335,15 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long
|
|||||||
XCopyArea(dpy, image->image, button->window, copy_gc,
|
XCopyArea(dpy, image->image, button->window, copy_gc,
|
||||||
left, 0, width, image->height, x, y);
|
left, 0, width, image->height, x, y);
|
||||||
} else {
|
} else {
|
||||||
XSetForeground(dpy, copy_gc, scr->dark_pixel);
|
if (wPreferences.new_style == TS_OLD) {
|
||||||
XFillRectangle(dpy, button->window, copy_gc, 0, 0, button->width, button->height);
|
XSetForeground(dpy, copy_gc, scr->dark_pixel);
|
||||||
|
XFillRectangle(dpy, button->window, copy_gc, 0, 0,
|
||||||
|
button->width, button->height);
|
||||||
|
} else {
|
||||||
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
|
XCopyArea(dpy, image->image, button->window, copy_gc,
|
||||||
|
left, 0, width, image->height, x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pushed) {
|
if (pushed) {
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ void wMenuRealize(WMenu * menu)
|
|||||||
if (menu->flags.titled) {
|
if (menu->flags.titled) {
|
||||||
twidth = WMWidthOfString(scr->menu_title_font, menu->frame->title, strlen(menu->frame->title));
|
twidth = WMWidthOfString(scr->menu_title_font, menu->frame->title, strlen(menu->frame->title));
|
||||||
theight = menu->frame->top_width;
|
theight = menu->frame->top_width;
|
||||||
twidth += theight + (wPreferences.new_style ? 16 : 8);
|
twidth += theight + (wPreferences.new_style == TS_NEW ? 16 : 8);
|
||||||
} else {
|
} else {
|
||||||
twidth = 0;
|
twidth = 0;
|
||||||
theight = 0;
|
theight = 0;
|
||||||
|
|||||||
48
src/screen.c
48
src/screen.c
@@ -148,40 +148,72 @@ static void allocButtonPixmaps(WScreen * scr)
|
|||||||
WPixmap *pix;
|
WPixmap *pix;
|
||||||
|
|
||||||
/* create predefined pixmaps */
|
/* create predefined pixmaps */
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_CLOSE_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_CLOSE_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_CLOSE_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_CLOSE] = pix;
|
scr->b_pixmaps[WBUT_CLOSE] = pix;
|
||||||
|
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_BROKEN_CLOSE_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_BROKEN_CLOSE_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_BROKEN_CLOSE_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_BROKENCLOSE] = pix;
|
scr->b_pixmaps[WBUT_BROKENCLOSE] = pix;
|
||||||
|
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_ICONIFY_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_ICONIFY_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_ICONIFY_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_ICONIFY] = pix;
|
scr->b_pixmaps[WBUT_ICONIFY] = pix;
|
||||||
#ifdef XKB_BUTTON_HINT
|
#ifdef XKB_BUTTON_HINT
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP1_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_XKBGROUP1_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP1_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_XKBGROUP1] = pix;
|
scr->b_pixmaps[WBUT_XKBGROUP1] = pix;
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP2_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_XKBGROUP2_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP2_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_XKBGROUP2] = pix;
|
scr->b_pixmaps[WBUT_XKBGROUP2] = pix;
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP3_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_XKBGROUP3_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP3_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_XKBGROUP3] = pix;
|
scr->b_pixmaps[WBUT_XKBGROUP3] = pix;
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP4_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_XKBGROUP4_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_XKBGROUP4_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_XKBGROUP4] = pix;
|
scr->b_pixmaps[WBUT_XKBGROUP4] = pix;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pix = wPixmapCreateFromXPMData(scr, PRED_KILL_XPM);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, NEXT_KILL_XPM);
|
||||||
|
} else {
|
||||||
|
pix = wPixmapCreateFromXPMData(scr, PRED_KILL_XPM);
|
||||||
|
}
|
||||||
if (pix)
|
if (pix)
|
||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->b_pixmaps[WBUT_KILL] = pix;
|
scr->b_pixmaps[WBUT_KILL] = pix;
|
||||||
|
|||||||
@@ -553,20 +553,32 @@ void wDrawBevel(Drawable d, unsigned width, unsigned height, WTexSolid * texture
|
|||||||
segs[1].y1 = 1;
|
segs[1].y1 = 1;
|
||||||
segs[1].x2 = width - 2;
|
segs[1].x2 = width - 2;
|
||||||
segs[1].y2 = height - 2;
|
segs[1].y2 = height - 2;
|
||||||
XDrawSegments(dpy, d, dim, segs, 2);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
XDrawSegments(dpy, d, dark, segs, 2);
|
||||||
|
} else {
|
||||||
|
XDrawSegments(dpy, d, dim, segs, 2);
|
||||||
|
}
|
||||||
segs[0].x1 = 0;
|
segs[0].x1 = 0;
|
||||||
segs[0].x2 = width - 1;
|
segs[0].x2 = width - 1;
|
||||||
segs[0].y2 = segs[0].y1 = height - 1;
|
segs[0].y2 = segs[0].y1 = height - 1;
|
||||||
segs[1].x1 = segs[1].x2 = width - 1;
|
segs[1].x1 = segs[1].x2 = width - 1;
|
||||||
segs[1].y1 = 0;
|
segs[1].y1 = 0;
|
||||||
segs[1].y2 = height - 1;
|
segs[1].y2 = height - 1;
|
||||||
XDrawSegments(dpy, d, dark, segs, 2);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
XDrawSegments(dpy, d, light, segs, 2);
|
||||||
|
} else {
|
||||||
|
XDrawSegments(dpy, d, dark, segs, 2);
|
||||||
|
}
|
||||||
segs[0].x1 = segs[0].y1 = segs[0].y2 = 0;
|
segs[0].x1 = segs[0].y1 = segs[0].y2 = 0;
|
||||||
segs[0].x2 = width - 2;
|
segs[0].x2 = width - 2;
|
||||||
segs[1].x1 = segs[1].y1 = 0;
|
segs[1].x1 = segs[1].y1 = 0;
|
||||||
segs[1].x2 = 0;
|
segs[1].x2 = 0;
|
||||||
segs[1].y2 = height - 2;
|
segs[1].y2 = height - 2;
|
||||||
XDrawSegments(dpy, d, light, segs, 2);
|
if (wPreferences.new_style == TS_NEXT) {
|
||||||
|
XDrawSegments(dpy, d, dark, segs, 2);
|
||||||
|
} else {
|
||||||
|
XDrawSegments(dpy, d, light, segs, 2);
|
||||||
|
}
|
||||||
if (relief == WREL_ICON) {
|
if (relief == WREL_ICON) {
|
||||||
segs[0].x1 = segs[0].y1 = segs[0].y2 = 1;
|
segs[0].x1 = segs[0].y1 = segs[0].y2 = 1;
|
||||||
segs[0].x2 = width - 2;
|
segs[0].x2 = width - 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user