Re: Using SVG for icons (and scaling)

2018-07-18 Thread Luca Bacci via gtk-app-devel-list
SVG are supported in Gtk (and Glade) Support for image formats is modularized in form of plugins, you just need to get the plugin for SVG. In many distros you have to install 'librsvg' to get the SVG loader. As for scaling goes, GtkImage can scale images only when using icon-name source and not f

return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
Hi, does anyone know what meaning has the return value from expose event handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea? When one should return TRUE, and when FALSE? I can't find any information in the reference manual Thank you! Luca

Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
All right, I missed that! Thank you! Luca 2018-08-14 18:56 GMT+02:00 Emmanuele Bassi : > Hi; > > On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > >> Hi, does anyone know what meaning has the return value from e

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
Probably it's a consequence of this work for porting GtkMenuBar to use css gadgets internally: https://gitlab.gnome.org/GNOME/gtk/commit/700286c6 You should be able to get the appropriate size if you add menu items to the bar, i.e. as long as the menubar is not empty you get the appropriate height

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
If you really need, you can fake it by adding a menuitem with empty text and setting it to invisible with gtk_widget_set_visible(menuitem, false); Il giorno sab 24 nov 2018 alle ore 15:59 Luca Bacci ha scritto: > Probably it's a consequence of this work for porting GtkMenuBar to use css > gadget

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-26 Thread Luca Bacci via gtk-app-devel-list
Hi Sébastien! It's not simple, but you may try with combinations of GtkStyleContext *style = gtk_widget_get_style_context(widget); GValue value = G_VALUE_INIT; gtk_style_context_get_style_property(style, "prop-name", &value); //or gtk_style_context_get_property(style, "prop-name", &value); /* ...

Re: How to replace gtk_widget_modify_text() with CSS?

2018-12-18 Thread Luca Bacci via gtk-app-devel-list
Hi Nate, based on my experience, you have 3 ways: 1) First, see if there are standard CSS classes provided by the theme for your use case. For example, GtkButton has the *.suggegsted-action* and *.destructive-action* CSS classes, which all t

Re: Detecting the gdk backend

2019-02-07 Thread Luca Bacci via gtk-app-devel-list
Hi! There is some reference code here: https://developer.gnome.org/gdk3/stable/gdk3-Wayland-Interaction.html https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html - Include the backend specific headers: gdk/gdkx.h, gdk/gdkwayland.h - Link with backend specific libs: g