* font selection problem
@ 2003-03-25 11:23 Stan Pinte
2003-03-28 0:13 ` Daniel Skarda
0 siblings, 1 reply; 2+ messages in thread
From: Stan Pinte @ 2003-03-25 11:23 UTC (permalink / raw)
Cc: guile-user
hello,
I do not know if anyone has ever tried to set different fonts for labels, buttons, etc from a resource file, using guile-gtk.
Anyway, the "font" directives do not seem to have any impact on the font used by Gtk...
I am using guile-gtk-1.2.31, and guile-1.6.2 ...
the included test program should proof the fact...
Any ideas?
thanks a lot,
Stan.
resource file:
style "my-style"
{
#bg[NORMAL]="#333"
#fg[SELECTED]="#FFF"
#fg[NORMAL] = "#aacccc"
#font = "-adobe-helvetica-bold-*-*--*-*-*-*-*-*-*-*"
font = "-misc-fixed-medium-r-normal--10-*-*-*-*-*-*-*"
#font="-adobe-helvetica-bold-*-normal-*-10-*-*-*-*-*-iso8859-*"
#font="-adobe-courier-medium-i-normal-*-*-100-*-*-m-*-iso8859-1"
}
class "*GtkButton*" style "my-style"
#class "*GtkLabel*" style "my-style"
#class "*GtkEntry" style "my-style"
widget "*mybutton" style "my-style"
widget "*mylabel" style "my-style"
program:
(use-modules (gtk gtk))
(gtk-rc-parse "hellorc")
(let ((window (gtk-window-new 'toplevel))
(vbox (gtk-vbox-new #f 0))
(button (gtk-button-new-with-label "Say Hello"))
(label (gtk-label-new "test")))
(gtk-widget-set-name button "mybutton")
(gtk-widget-set-name window "mywindow")
(gtk-widget-set-name label "mylabel")
(gtk-window-set-title window "Guile-Gtk: Hello World")
(gtk-container-border-width window 10)
(gtk-container-add vbox button)
(gtk-container-add vbox label)
(gtk-container-add window vbox)
(gtk-signal-connect button "clicked"
(lambda ()
(display "Hello World!")
(newline)
(gtk-widget-destroy window)))
(gtk-widget-show-all window)
(gtk-standalone-main window))
--
Stanislas Pinte
Computer Consultant
98, rue Bois l'Evêque
B-4000 Liège
web: http://www.altosw.be
email: alto_stan@wanadoo.be
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: font selection problem
2003-03-25 11:23 font selection problem Stan Pinte
@ 2003-03-28 0:13 ` Daniel Skarda
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Skarda @ 2003-03-28 0:13 UTC (permalink / raw)
Cc: guile-user
Hello,
guile-gtk always calls gtk_set_locale - unlike usual C Gtk+ programs, where
you have to write gtk_set_locale explicitly.
If you want to modify fonts, you should use "fontset" instead of "font" (see
gtk+-1.2.x/gtk/gtkrc.iso* files)
0.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-28 0:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-25 11:23 font selection problem Stan Pinte
2003-03-28 0:13 ` Daniel Skarda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).