You are not logged in.

#1 2013-08-10 06:34:46

simargl
Member
Registered: 2013-02-13
Posts: 51
Website

Label text size in Glade

I've made one simple application launcher in Glade, added buttons, icons and used Vala for callback functions. Now, I'd like to make label text on those buttons a bit smaller, set them to have fixed size, but can't find how to do that. Any suggestions?

Offline

#2 2013-08-10 10:25:26

SahibBommelig
Member
From: Germany
Registered: 2010-05-28
Posts: 80

Re: Label text size in Glade

Use Pango Markup.

1) Get the Label from the Button (e.g. with button.get_child())
2) Make the Label use Markup (label.set_use_markup(True))
3) Use for example this as markup:
     

<small><tt>Your text here</tt></small>

If your text contains stuff like & you should use g_markup_escape_text() to escape it.

Edit: Additional Information: https://developer.gnome.org/pango/stabl … ormat.html

Last edited by SahibBommelig (2013-08-10 10:26:04)

Offline

#3 2013-08-10 12:53:51

simargl
Member
Registered: 2013-02-13
Posts: 51
Website

Re: Label text size in Glade

OK, will try that. Thanks

Offline

Board footer

Powered by FluxBB