mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
only scale down icons (not up)
This commit is contained in:
@@ -194,7 +194,7 @@ static void addIconForWindow(WSwitchPanel *panel, WWindow *wwin, int iconWidth)
|
|||||||
if (!image && panel->defIcon)
|
if (!image && panel->defIcon)
|
||||||
image= RRetainImage(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;
|
RImage *nimage;
|
||||||
nimage= RScaleImage(image, iconWidth, (image->height * iconWidth / image->width));
|
nimage= RScaleImage(image, iconWidth, (image->height * iconWidth / image->width));
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
|
|||||||
Reference in New Issue
Block a user