diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 5553d5b3..9689cba6 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -426,6 +426,7 @@ extern struct WPreferences { char cycle_ignore_minimized; /* Ignore minimized windows when cycling */ char strict_windoze_cycle; /* don't close switch panel when shift is released */ char panel_only_open; /* Only open the switch panel; don't switch */ + char apercu_size; /* Size of apercu preview as a multiple of icon size */ /* All delays here are in ms. 0 means instant auto-action. */ int clip_auto_raise_delay; /* Delay after which the clip will be raised when entered */ diff --git a/src/balloon.c b/src/balloon.c index 1fae947d..22b11604 100644 --- a/src/balloon.c +++ b/src/balloon.c @@ -423,8 +423,8 @@ static void showApercu(WScreen *scr, int x, int y, int height, int width, char * } XCopyArea(dpy, apercu, pixmap, scr->draw_gc, - 0, 0, (wPreferences.icon_size - 1 - APERCU_BORDER) * 2, - (wPreferences.icon_size - 1 - APERCU_BORDER) * 2, + 0, 0, (wPreferences.icon_size - 1 - APERCU_BORDER) * wPreferences.apercu_size, + (wPreferences.icon_size - 1 - APERCU_BORDER) * wPreferences.apercu_size, APERCU_BORDER, APERCU_BORDER + titleHeight); #ifdef SHAPED_BALLOON @@ -460,7 +460,7 @@ static void showBalloon(WScreen * scr) if (wPreferences.miniwin_apercu_balloon && scr->balloon->apercu != None) /* used to display either the apercu alone or the apercu and the title */ - showApercu(scr, x, y, (wPreferences.icon_size - 1) * 2, (wPreferences.icon_size - 1) * 2, + showApercu(scr, x, y, (wPreferences.icon_size - 1) * wPreferences.apercu_size, (wPreferences.icon_size - 1) * wPreferences.apercu_size, scr->balloon->text, scr->balloon->apercu); else showText(scr, x, y, scr->balloon->h, w, scr->balloon->text); diff --git a/src/defaults.c b/src/defaults.c index 155fe6f7..5e305c90 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -479,6 +479,8 @@ WDefaultEntry optionList[] = { &wPreferences.strict_windoze_cycle, getBool, NULL, NULL, NULL}, {"SwitchPanelOnlyOpen", "NO", NULL, &wPreferences.panel_only_open, getBool, NULL, NULL, NULL}, + {"ApercuSize", "2", NULL, + &wPreferences.apercu_size, getInt, NULL, NULL, NULL}, /* style options */ diff --git a/src/icon.c b/src/icon.c index e1321fae..d8265b52 100644 --- a/src/icon.c +++ b/src/icon.c @@ -593,8 +593,8 @@ void set_icon_apercu(WIcon *icon, RImage *image) RImage *scaled_apercu; WScreen *scr = icon->core->screen_ptr; - scaled_apercu = RSmoothScaleImage(image, (wPreferences.icon_size - 1 - APERCU_BORDER) * 2, - (wPreferences.icon_size - 1 - APERCU_BORDER) * 2 ); + scaled_apercu = RSmoothScaleImage(image, (wPreferences.icon_size - 1 - APERCU_BORDER) * wPreferences.apercu_size, + (wPreferences.icon_size - 1 - APERCU_BORDER) * wPreferences.apercu_size); if (RConvertImage(scr->rcontext, scaled_apercu, &tmp)) { if (icon->apercu != None)