How to change GTK+3 label color dynamically

2017-03-15 Thread Rúben Rodrigues
Hi, Now i need to change GtkLabel color dinamically, so i thing that i can't use Css to do this.. I do this in Gtk2: gtk_widget_modify_fg(GTK_WIDGET(gtk_builder_get_object(builder,"label")),GTK_STATE_NORMAL, ); How can i change the color in Gtk3? Thanks

Re: gtk3 layout background image

2017-03-15 Thread Rúben Rodrigues
Hi again, I tested with GtkBox and don't works.. My code is correct? GFile *file= g_file_new_for_path("custom.css"); GtkStyleProvider *css_provider = GTK_STYLE_PROVIDER(gtk_css_provider_new()); gtk_css_provider_load_from_file(GTK_CSS_PROVIDER(css_provider), file, );

Re: gtk3 layout background image

2017-03-15 Thread Rúben Rodrigues
Thanks, it works! On 15-03-2017 12:49, mhora...@gmail.com wrote: > You need to give the widget a "name" property - than you can select it > in CSS! > > Best, > Martin > > On Wed, 2017-03-15 at 10:28 +, Rúben Rodrigues wrote: >> Hi, >> >> I see now, that the problem i'm not do in correct

Re: gtk3 layout background image

2017-03-15 Thread Rúben Rodrigues
Hi, I see now, that the problem i'm not do in correct mode. I do this: GtkButton{ color: blue; } and works. All buttons change to blue color. But when i'm changing a specific label or GtkBox to put background i do this: GtkLabel#label_Avg_Temp_value{ color: red;

Re: How to set initial size of TextView?

2017-03-15 Thread Chris Green
Eric Cashon via gtk-app-devel-list wrote: > > > Hi Chris, > > Try getting the font height and base the textview height on that. If you > use the font ascent you might have to pad it a little but it should give > you a consistent value to size your textviews