1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

only scale down icons (not up)

This commit is contained in:
kojima
2004-10-17 05:22:24 +00:00
parent 7929d55f3f
commit 19c7a99197

View File

@@ -194,7 +194,7 @@ static void addIconForWindow(WSwitchPanel *panel, WWindow *wwin, int iconWidth)
if (!image && panel->defIcon)
image= RRetainImage(panel->defIcon);
if (image && (abs(image->width - iconWidth) > 2 || abs(image->height - iconWidth) > 2)) {
if (image && ((image->width - iconWidth) > 2 || (image->height - iconWidth) > 2)) {
RImage *nimage;
nimage= RScaleImage(image, iconWidth, (image->height * iconWidth / image->width));
RReleaseImage(image);