Commit f5c6dbaa authored by Jim Nelson's avatar Jim Nelson

Fix for multiple trinkets from Martin Robinson.

parent 0595475f
......@@ -4,6 +4,7 @@ Joeny Ang <ang.joeny@gmail.com>
Matthias Clasen <matthias.clasen@gmail.com>
David Jeske <davidj@gmail.com>
Paul Novak <pnovak@alumni.caltech.edu>
Martin Robinson <martin.james.robinson@gmail.com>
Shan Xiong <shan.xiong@gmail.com>
Translations courtesy of:
......
......@@ -299,7 +299,7 @@ public abstract class CheckerboardItem : ThumbnailView {
Gee.List<Gdk.Pixbuf>? trinkets = get_trinkets(TRINKET_SCALE);
if (trinkets != null) {
foreach (Gdk.Pixbuf trinket in trinkets)
trinkets_width += trinket.get_width();
trinkets_width += trinket.get_width() + TRINKET_PADDING;
}
}
......@@ -384,9 +384,11 @@ public abstract class CheckerboardItem : ThumbnailView {
// draw trinkets last
if (trinkets != null) {
int current_trinkets_width = 0;
foreach (Gdk.Pixbuf trinket in trinkets) {
current_trinkets_width = current_trinkets_width + trinket.get_width() + TRINKET_PADDING;
drawable.draw_pixbuf(gc, trinket, 0, 0,
pixbuf_origin.x + pixbuf_dim.width - trinket.get_width() - TRINKET_PADDING,
pixbuf_origin.x + pixbuf_dim.width - current_trinkets_width,
pixbuf_origin.y + pixbuf_dim.height - trinket.get_height() - TRINKET_PADDING,
trinket.get_width(), trinket.get_height(), Gdk.RgbDither.NORMAL, 0, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment