Re: Howto set horiz space/padding between vbox and statusbar?
- From: Chris Moller <moller mollerware com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Howto set horiz space/padding between vbox and statusbar?
- Date: Tue, 08 Dec 2015 01:14:13 -0500
Kinda guessing--I've never used it--but maybe try setting the child
margin-start property?
On 12/08/15 00:13, David C. Rankin wrote:
All,
I have been pulling my hair out trying to tweak the padding between
a GtkVBox and a GtkStatusbar. I have the following main window layout:
main window
vbox = gtk_vbox_new (FALSE, 0);
menubar
scrolled-window
textview
statusbar
The problem is the scrolled-window and textview widgets provide a nice
10 pixel border created with:
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (app->view), 5);
...
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);
The statusbar however, is positioned snugly against the left border of
the main window and vbox at the bottom. I would like to move the
statusbar display to the right (pad it on the left) by 10 pixels to
match the textview.
I have tried adjusting the padding with the following:
/* create/pack statusbar at end */
app->statusbar = gtk_statusbar_new ();
gboolean expand = 0;
gboolean fill = 0;
guint pad = 0;
GtkPackType packtype = 0;
gtk_box_query_child_packing (GTK_BOX (vbox), app->statusbar,
&expand, &fill, &pad, &packtype);
pad += 10;
gtk_box_set_child_packing (GTK_BOX (vbox), app->statusbar, expand,
fill, pad, packtype);
status_set_default (app);
gtk_box_pack_end (GTK_BOX (vbox), app->statusbar, FALSE, FALSE, 0);
However, there is no change in the statusbar display. What say the
experts? What part of the object hierarchy am I missing/screwing up?
Thanks.
p.s. sorry if you get 2 copies, the first went to the 'requests' list
by mistake.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]