mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-30 20:35:49 +01:00
Added clickability on preview box (appearance) to select item to
edit texture for.
This commit is contained in:
@@ -820,8 +820,6 @@ extractTexture(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
changePage(WMWidget *w, void *data)
|
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
|
static void
|
||||||
textureClick(WMWidget *w, void *data)
|
textureClick(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
@@ -1104,6 +1130,10 @@ createPanel(Panel *p)
|
|||||||
WMMoveWidget(panel->prevL, 15, 10);
|
WMMoveWidget(panel->prevL, 15, 10);
|
||||||
WMSetLabelRelief(panel->prevL, WRSunken);
|
WMSetLabelRelief(panel->prevL, WRSunken);
|
||||||
WMSetLabelImagePosition(panel->prevL, WIPImageOnly);
|
WMSetLabelImagePosition(panel->prevL, WIPImageOnly);
|
||||||
|
|
||||||
|
WMCreateEventHandler(WMWidgetView(panel->prevL), ButtonPressMask,
|
||||||
|
previewClick, panel);
|
||||||
|
|
||||||
|
|
||||||
panel->secP = WMCreatePopUpButton(panel->frame);
|
panel->secP = WMCreatePopUpButton(panel->frame);
|
||||||
WMResizeWidget(panel->secP, 260, 20);
|
WMResizeWidget(panel->secP, 260, 20);
|
||||||
|
|||||||
@@ -268,7 +268,8 @@ createMainWindow(WMScreen *scr)
|
|||||||
WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);
|
WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);
|
||||||
WMSetFrameRelief(WPrefs.banner, WRFlat);
|
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)
|
if (!font)
|
||||||
font = WMBoldSystemFontOfSize(scr, 24);
|
font = WMBoldSystemFontOfSize(scr, 24);
|
||||||
WPrefs.nameL = WMCreateLabel(WPrefs.banner);
|
WPrefs.nameL = WMCreateLabel(WPrefs.banner);
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user