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,
&error);
gtk_
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 mode.
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;
font-family
*da, cairo_t *cr, gpointer data)
{
cairo_set_source_rgb(cr, 0.0, 1.0, 0.0);
cairo_paint(cr);
return FALSE;
}
-Original Message-
From: Rúben Rodrigues
To: Emmanuele Bassi
Cc: gtk-app-devel-list
Sent: Tue, Mar 14, 2017 8:00 am
Subject: Re: gtk3 layout background image
Thanks again!
So, i will test with gtkbox. thanks for explanation..
Às 14:46 de 14/03/2017, Emmanuele Bassi escreveu:
> On 14 March 2017 at 14:31, Rúben Rodrigues wrote:
>> Just window can have background?
> I was referring to GdkWindow, not GtkWindow.
>
> GtkBox draws background, for instance;
On 14 March 2017 at 14:31, Rúben Rodrigues wrote:
> Just window can have background?
I was referring to GdkWindow, not GtkWindow.
GtkBox draws background, for instance; GtkGrid does as well.
> I don't know why is a violation, because in my case my
> applicationdoesn't make sense without backgro
Just window can have background?
I don't know why is a violation, because in my case my
applicationdoesn't make sense without background image..
On 14-03-2017 14:01, Emmanuele Bassi wrote:
> You were not changing the background with your theme: you were
> programmatically replacing the base pix
You were not changing the background with your theme: you were
programmatically replacing the base pixmap of the GdkWindow used by
GtkLayout. It was essentially a layering violation, and would actually
break your theme.
The API reference for each GTK widget should tell you the CSS styling
availabl
Thanks!
But in GTK+2 we could change background in layout with this:
// Set picture as background.
//gdk_pixbuf_render_pixmap_and_mask (pixbuf, &background, NULL, 0);
//style = gtk_style_new ();
//style->bg_pixmap[0] = background;
//homeWindow = GTK_WIDGET(gtk_buil
Not all GTK containers draw a background, mostly for historical
reasons. This has been true for GTK 1.x, 2.x, and 3.x.
In particular, GtkLayout does not draw any background with CSS, so you
will need to either subclass GtkLayout, override the GtkWidget::draw
virtual function, and call gtk_render_*
I verify that i can't use css provider, don't works.
My css file is :
GtkLayout#layout_Home.background{
background-image: url('background.png');
}
GtkLabel#Home_Cooling_Tunnel1_Cooler_label1{
color: white;
}
GtkLabel#Home_Sensors_MoistAvg_value{
font-family: Segoe UI;
font-w
Hi guys,
Finnaly i migrate my application to gtk+3. So, now i neet to change some
things like image background. I used css provider like in this :
custom.css file:
GtkLayout:layout_Home{
background-color: black;
}
C Program:
GFile *file= g_file_new_for_path("custom.css");
GtkCs
12 matches
Mail list logo