Re: setting the font of a dialog widget

2008-04-27 Thread jcupitt
On 26/04/2008, Garth's KidStuff [EMAIL PROTECTED] wrote:
 I just now got back to this problem.  Maybe I'm misunderstanding something,
 but it seems that the solution you recommend is solely a solution for
 Gtk::Labels -- not for general widgets.  I can change the font size for
 labels -- but not for other widgets (e.g. CheckButton, RadioButton.).
 That's my issue.

All of the button classes are containers with a single 'display'
widget packed inside. The display widget is usually a label, but it
can be anything (a pixmap, for example, or an hbox with a pixmap and a
couple of labels).

So to use pangomarkup to set the font size, cast the button to GtkBin
and get the child, then use gtk_label_set_markup() to set the label's
font size.

  label = gtk_bin_get_child (GTK_BIN (button))
  gtk_label_set_markup (GTK_LABEL (label), ...)

You can also set the font size from resource files. If you want to set
the size for all labels, that might be a better solution. Pangomarkup
is good if you want to mix font sizes or attributes within a single
label.

See:

http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html

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


Re:Re: setting the font of a dialog widget

2008-04-27 Thread Chandra Shekhar Sengupta
hi ,
you can change the font size of a general widget from rc file. Refer the
following code.
///
style dialogstyle = default
{
  font_name = Sans 20
}

widget_class *Dialog* style dialogstyle


Include the above code to rc file . It works.

Regards,
Chandra Shekhar Sengupta

Date: Sat, 26 Apr 2008 10:10:45 -0700
From: Garth's KidStuff [EMAIL PROTECTED]
Subject: Re: setting the font of a dialog widget
To: gtk-app-devel-list@gnome.org, [EMAIL PROTECTED]
Message-ID:
   [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Hey there,

I just now got back to this problem.  Maybe I'm misunderstanding something,
but it seems that the solution you recommend is solely a solution for
Gtk::Labels -- not for general widgets.  I can change the font size for
labels -- but not for other widgets (e.g. CheckButton, RadioButton.).
That's my issue.

To recap:  How do I change the font size of a general widget?

Thanks in advance.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: setting the font of a dialog widget

2008-04-26 Thread Garth's KidStuff
Hey there,

I just now got back to this problem.  Maybe I'm misunderstanding something,
but it seems that the solution you recommend is solely a solution for
Gtk::Labels -- not for general widgets.  I can change the font size for
labels -- but not for other widgets (e.g. CheckButton, RadioButton.).
That's my issue.

To recap:  How do I change the font size of a general widget?

Thanks in advance.

2008/4/18 Garth's KidStuff [EMAIL PROTECTED]:
  that's not relevant).  If the widget I'm trying to set happens to be a
  Gtk::Label, then it works.  But other widgets (e.g. Gtk::Frame or
  Gtk::Checkbutton) don't and just seem to use their default font no matter
  what.  For example:

I do this with gtk_label_set_markup(). For example:

 gtk_label_set_markup (GTK_LABEL (label), span font_desc=\Sans\
size=\medium\hello/span);

 // Add the fixed widget to the dialog and size it properly
 get_vbox()-add(m_Fixed);
 m_Fixed.set_size_request( 566, 500 );

Fixed size widgets should be avoided if you possibly can, I'm sure you
know this. gtk has a lot of layout widgets you can use to make
resizeable dialogs.

John


-- 
Garth Upshaw
Garth's KidStuff
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: setting the font of a dialog widget

2008-04-18 Thread jcupitt
Hi Garth,

2008/4/18 Garth's KidStuff [EMAIL PROTECTED]:
  that's not relevant).  If the widget I'm trying to set happens to be a
  Gtk::Label, then it works.  But other widgets (e.g. Gtk::Frame or
  Gtk::Checkbutton) don't and just seem to use their default font no matter
  what.  For example:

I do this with gtk_label_set_markup(). For example:

  gtk_label_set_markup (GTK_LABEL (label), span font_desc=\Sans\
size=\medium\hello/span);

 // Add the fixed widget to the dialog and size it properly
 get_vbox()-add(m_Fixed);
 m_Fixed.set_size_request( 566, 500 );

Fixed size widgets should be avoided if you possibly can, I'm sure you
know this. gtk has a lot of layout widgets you can use to make
resizeable dialogs.

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