Skip to content
Commit e6caa8b8 authored by Tanu Kaskinen's avatar Tanu Kaskinen
Browse files

mainwindow: scale icons to sane size

If load_icon() fails, we treat the icon name as a file path and try to
load an image from the path. In case that works, we need to ensure that
the has correct size. Previously that wasn't done, which led to too
large icons.

scale_simple() doesn't do anything if the image is already the correct
size, so we can call it unconditionally.

The exception handling was a bit weird in that the exception types
didn't match the documentation of IconTheme::load_icon() and
Image::set(). I updated the exception types (Image::set() doesn't need
exception handling any more, because now it's called with a Pixbuf
rather than a file name).

Fixes: #60
parent a6d2c845
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment