diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index ea80de31..abc2fb85 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -820,8 +820,6 @@ extractTexture(WMWidget *w, void *data) } - - static void changePage(WMWidget *w, void *data) { @@ -875,6 +873,34 @@ changePage(WMWidget *w, void *data) +static void +previewClick(XEvent *event, void *clientData) +{ + _Panel *panel = (_Panel*)clientData; + int i; + static WMRect parts[6] = { + {{30, 10},{210, 20}}, + {{30,35},{210,20}}, + {{30,60},{210,20}}, + {{30,95},{100,20}}, + {{30,115},{100,60}}, + {{170,90},{64,64}} + }; + + for (i = 0; i < 6; i++) { + if (event->xbutton.x >= parts[i].pos.x + && event->xbutton.y >= parts[i].pos.y + && event->xbutton.x < parts[i].pos.x + parts[i].size.width + && event->xbutton.y < parts[i].pos.y + parts[i].size.height) { + + WMSetPopUpButtonSelectedItem(panel->secP, i); + changePage(panel->secP, panel); + return; + } + } +} + + static void textureClick(WMWidget *w, void *data) { @@ -1104,6 +1130,10 @@ createPanel(Panel *p) WMMoveWidget(panel->prevL, 15, 10); WMSetLabelRelief(panel->prevL, WRSunken); WMSetLabelImagePosition(panel->prevL, WIPImageOnly); + + WMCreateEventHandler(WMWidgetView(panel->prevL), ButtonPressMask, + previewClick, panel); + panel->secP = WMCreatePopUpButton(panel->frame); WMResizeWidget(panel->secP, 260, 20); diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index a3ccbdf4..ee4cad20 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -268,7 +268,8 @@ createMainWindow(WMScreen *scr) WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP); WMSetFrameRelief(WPrefs.banner, WRFlat); - font = WMCreateFont(scr, "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*"); + font = WMCreateFont(scr, "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*," + "-*-fixed-medium-r-normal-*-24-*"); if (!font) font = WMBoldSystemFontOfSize(scr, 24); WPrefs.nameL = WMCreateLabel(WPrefs.banner); diff --git a/WPrefs.app/tiff/tdel.tiff b/WPrefs.app/tiff/tdel.tiff index 58201d5f..6f4f4931 100644 Binary files a/WPrefs.app/tiff/tdel.tiff and b/WPrefs.app/tiff/tdel.tiff differ