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 with based on font size.
Eric
/*
gcc -Wall textview_height1.c -o textview_height1 `p
The layout is similar to a drawing area. Set up your "draw" callback and draw
what you like. You can put your pictures in there also and be able to scroll
them easily.
/*
gcc -Wall layout1.c -o layout1 `pkg-config --cflags --libs gtk+-3.0`
Tested on Ubuntu16.04 and GTK3.18
*/
#incl
I have a top level window in which I have five or six TextView text
entry fields. I want to be able to set the fields to different sizes,
at least initially. E.g. I have a couple of TextView fields that I
want to be just two lines high, two which should be four lines high
and one that needs to be
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
11 matches
Mail list logo