Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Moritz Renftle
Hi,

I recently noticed the nice appearance of the path bar widget in the
GtkFileChooserDialog:
http://imagepaste.nullnetwork.net/viewimage.php?id=4889
This look is also used for the top bar in the new GNOME system-settings.

I was wondering whether there is an easy way to turn a GtkButtonBox into
something with this look. At the moment, the ButtonBox in my
python-Gtk3-app looks like this:
http://imagepaste.nullnetwork.net/viewimage.php?id=4890

But I'd like to remove the vertical gap between the buttons in the
ButtonBox and have the nice rounded corners like in the path bar widget.
I tried to find the source code of the path bar but i failed reading the
c-code.

Is there a simple way to achieve this or would i have to implement my
own widget?

Thanks in advance for your help,
Moritz Renftle




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Moritz Renftle
I made a quick mockup to show you my idea:
http://imagepaste.nullnetwork.net/viewimage.php?id=4897

Am Montag, den 03.09.2012, 11:57 +0200 schrieb Moritz Renftle:
> Hi,
> 
> I recently noticed the nice appearance of the path bar widget in the
> GtkFileChooserDialog:
> http://imagepaste.nullnetwork.net/viewimage.php?id=4889
> This look is also used for the top bar in the new GNOME system-settings.
> 
> I was wondering whether there is an easy way to turn a GtkButtonBox into
> something with this look. At the moment, the ButtonBox in my
> python-Gtk3-app looks like this:
> http://imagepaste.nullnetwork.net/viewimage.php?id=4890
> 
> But I'd like to remove the vertical gap between the buttons in the
> ButtonBox and have the nice rounded corners like in the path bar widget.
> I tried to find the source code of the path bar but i failed reading the
> c-code.
> 
> Is there a simple way to achieve this or would i have to implement my
> own widget?
> 
> Thanks in advance for your help,
> Moritz Renftle
> 
> 
> 
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Olivier Sessink
On 09/03/2012 11:57 AM, Moritz Renftle wrote:
> Hi,
> 
> I recently noticed the nice appearance of the path bar widget in the
> GtkFileChooserDialog:
> http://imagepaste.nullnetwork.net/viewimage.php?id=4889
> This look is also used for the top bar in the new GNOME system-settings.
> 
> I was wondering whether there is an easy way to turn a GtkButtonBox into
> something with this look.

have you looked into the GtkFileChooserDialog source, such as
http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserwidget.c ?

Olivier


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Re: Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Moritz Renftle
hi olivier,

i spent the whole evening looking through the source of
gtkfilechooserwidget and finally found a source file named
"gtkpathbar.c":
http://fossies.org/dox/gtk+-3.4.4/gtkpathbar_8c_source.html
it's a widget called gtkpathbar and exactly the one which is used in
gtkfilechooserwidget.

I found out it consists of several GtkToggleButtons which are packed
into a container. but i'm so bad at reading C (used to python only :/ )
that i still couldn't find the "trick" that is used in this code to put
the buttons together with round corners only for the buttons at the
side.

i also tried out if there is a thing like Gtk.PathBar.new() in python
but it seems like the PathBar-widget is meant to be used for the
filechooserdialog only.

if you could help me finding the "magic" lines that do the trick, i
would be very happy!

thank you for your effort,
moritz

Am Montag, den 03.09.2012, 19:15 +0200 schrieb Olivier Sessink:
> On 09/03/2012 11:57 AM, Moritz Renftle wrote:
> > Hi,
> > 
> > I recently noticed the nice appearance of the path bar widget in the
> > GtkFileChooserDialog:
> > http://imagepaste.nullnetwork.net/viewimage.php?id=4889
> > This look is also used for the top bar in the new GNOME system-settings.
> > 
> > I was wondering whether there is an easy way to turn a GtkButtonBox into
> > something with this look.
> 
> have you looked into the GtkFileChooserDialog source, such as
> http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserwidget.c ?
> 
> Olivier
> 
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Re: Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Paul Lange
Hey Moritz,

have a look at line 211 and 212. That should do the trick!

regards,
Paul

Am Montag, den 03.09.2012, 22:20 +0200 schrieb Moritz Renftle:
> hi olivier,
> 
> i spent the whole evening looking through the source of
> gtkfilechooserwidget and finally found a source file named
> "gtkpathbar.c":
> http://fossies.org/dox/gtk+-3.4.4/gtkpathbar_8c_source.html
> it's a widget called gtkpathbar and exactly the one which is used in
> gtkfilechooserwidget.
> 
> I found out it consists of several GtkToggleButtons which are packed
> into a container. but i'm so bad at reading C (used to python only :/ )
> that i still couldn't find the "trick" that is used in this code to put
> the buttons together with round corners only for the buttons at the
> side.
> 
> i also tried out if there is a thing like Gtk.PathBar.new() in python
> but it seems like the PathBar-widget is meant to be used for the
> filechooserdialog only.
> 
> if you could help me finding the "magic" lines that do the trick, i
> would be very happy!
> 
> thank you for your effort,
> moritz
> 
> Am Montag, den 03.09.2012, 19:15 +0200 schrieb Olivier Sessink:
> > On 09/03/2012 11:57 AM, Moritz Renftle wrote:
> > > Hi,
> > > 
> > > I recently noticed the nice appearance of the path bar widget in the
> > > GtkFileChooserDialog:
> > > http://imagepaste.nullnetwork.net/viewimage.php?id=4889
> > > This look is also used for the top bar in the new GNOME system-settings.
> > > 
> > > I was wondering whether there is an easy way to turn a GtkButtonBox into
> > > something with this look.
> > 
> > have you looked into the GtkFileChooserDialog source, such as
> > http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserwidget.c ?
> > 
> > Olivier
> > 
> > 
> > ___
> > gtk-app-devel-list mailing list
> > gtk-app-devel-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> > 
> 
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Re: Howto make a Gtk.Buttonbox look like the path bar in Gtk.FileChooserDoalog?

2012-09-03 Thread Moritz Renftle
thanks so much!
moritz

Am Montag, den 03.09.2012, 22:36 +0200 schrieb Paul Lange:
> Hey Moritz,
> 
> have a look at line 211 and 212. That should do the trick!
> 
> regards,
> Paul
> 



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list