src/Builder4/PopoverFiles.bjs
authorAlan <alan@roojs.com>
Fri, 20 May 2022 07:18:50 +0000 (15:18 +0800)
committerAlan <alan@roojs.com>
Fri, 20 May 2022 07:18:50 +0000 (15:18 +0800)
src/Builder4/PopoverFiles.vala

src/Builder4/PopoverFiles.bjs
src/Builder4/PopoverFiles.vala

index 5d98980..06814c6 100644 (file)
     "        try {",
     "\t\t    if (FileUtils.test(fname, FileTest.EXISTS)) {",
     "\t\t        var npixbuf = new Gdk.Pixbuf.from_file(fname);",
-    "\t\t        pixbuf = npixbuf.scale_simple(92, 92 * (npixbuf.height/npixbuf.width  ), Gdk.InterpType.NEAREST) ;",
+    "\t\t        pixbuf = npixbuf.scale_simple(92, 92.0 * (npixbuf.height * 1.0 /npixbuf.width * 1.0  ), Gdk.InterpType.NEAREST) ;",
     "\t\t    } ",
     "\t\t} catch (Error e) {",
     "\t\t    // noop",
index e8409ce..8ab907c 100644 (file)
@@ -168,7 +168,7 @@ public class Xcls_PopoverFiles : Object
             try {
                    if (FileUtils.test(fname, FileTest.EXISTS)) {
                        var npixbuf = new Gdk.Pixbuf.from_file(fname);
-                       pixbuf = npixbuf.scale_simple(92, 92 * (npixbuf.height/npixbuf.width  ), Gdk.InterpType.NEAREST) ;
+                       pixbuf = npixbuf.scale_simple(92, 92.0 * (npixbuf.height * 1.0 /npixbuf.width * 1.0  ), Gdk.InterpType.NEAREST) ;
                    } 
                } catch (Error e) {
                    // noop