mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
wmaker: Scale image to make them fit in the preview panel
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
050cae3bd2
commit
36159c614f
@@ -619,7 +619,8 @@ static void setViewedImage(IconPanel *panel, const char *file)
|
||||
color.green = 0xaa;
|
||||
color.blue = 0xae;
|
||||
color.alpha = 0;
|
||||
pixmap = WMCreateBlendedPixmapFromFile(WMWidgetScreen(panel->win), file, &color);
|
||||
pixmap = WMCreateScaledBlendedPixmapFromFile(WMWidgetScreen(panel->win), file, &color, 75, 75);
|
||||
|
||||
if (!pixmap) {
|
||||
WMSetButtonEnabled(panel->okButton, False);
|
||||
|
||||
@@ -742,7 +743,7 @@ static void drawIconProc(WMList * lPtr, int index, Drawable d, char *text, int s
|
||||
color.blue = WMBlueComponentOfColor(back) >> 8;
|
||||
color.alpha = WMGetColorAlpha(back) >> 8;
|
||||
|
||||
pixmap = WMCreateBlendedPixmapFromFile(wmscr, file, &color);
|
||||
pixmap = WMCreateScaledBlendedPixmapFromFile(wmscr, file, &color, width - 2, height - 2);
|
||||
wfree(file);
|
||||
|
||||
if (!pixmap) {
|
||||
|
||||
Reference in New Issue
Block a user