From: Stan Pinte <stan@altosw.be>
To: guile-gtk <guile-gtk@sources.redhat.com>
Cc: guile-user <guile-user@gnu.org>
Subject: font selection problem
Date: Tue, 25 Mar 2003 10:49:00 -0000 [thread overview]
Message-ID: <20030325122324.4c42eadf.stan@altosw.be> (raw)
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
next reply other threads:[~2003-03-25 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-25 10:49 Stan Pinte [this message]
2003-03-28 0:12 ` Daniel Skarda
2003-04-01 12:26 ` Stan Pinte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030325122324.4c42eadf.stan@altosw.be \
--to=stan@altosw.be \
--cc=guile-gtk@sources.redhat.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).