Search code examples
c++gtkmm

Icon size in gtkmm 3.18.0


I'm writing application using C++ and gtkmm. I figured out how to set icon as StackSwitcher label but now i have a problem with icon size. The stackswitcher displays them in 16x16 size regardless image native size.

I was trying to use the Gtk::StackSwitcher::property_icon_size() but it doesn't work beacuse of gtkmm version. This member function was introduced in gtkmm 3.20 and my version is 3.18. What is more i cannot update gtkmm. When i'm trying with apt-get (sudo apt-get install --only-upgrade libgtkmm-3.0-dev) it says that libgtkmm-3.0-dev is already the newest version (3.18.0-1). I was also trying to update it manually. I was able to download and install needed libraries but then my code has stopped working (when i compiled whole application i get quite a lot of errors like this: /usr/local/include/gtkmm-3.0/gtkmm/targetentry.h:48:24: error: expected ‘;’ at end of member declaration virtual ~TargetEntry() noexcept)

So my question is: Is it any way to change icon size in gtkmm 3.18 or how to update gtkmm to newer version to use property_icon_size()


Solution

  • I didn't find any way to change icon size in gtkmm 3.18 (or gtk 3.18). I managed to find the way to update the library though. Basically you can do it from source but for ubuntu 16.04 (and probably for older versions) gtkmm 3.2 doesn't work very well. The best solution is to update whole ubuntu distro to 17.10. Gtk/gtkmm is going to be update with distro and it will be working well.

    For me this update tutorial worked well.