On Fri, Jan 10, 2003 at 11:44:32AM -0500, Rene Olsthoorn wrote:
> Dear readers,
> 
> When my little application is finished, it must also run under Windows.
> I've noticed that the widgets are large under Windows. For instance, the menubar is 
>approx. 50% bigger than an average windows menubar. Also the Font is bigger.
> Does any have knowledge about how to change the default-fontsize for an application?
>

The reason the font looks so big is because Windows has a default res
of 96 dpi. When GTK was first released, most people were running with
monitors that were actually around 75dpi (I bet you that even today this
is still the case) and therefore most people were running their X server
at 75 dpi. When you run the default GTK font size (can't remember if its
10 or 12 points) at 96 it looks ridiculously big.

This does not require a change of theme. You simply need to edit your
gtkrc file or parse a new one when your program starts.

The "default" font on Windows 2000 systems is Tahoma 8.

You can edit the gtkrc-2.0 file in your GTK runtime tree.
You can also use the gtk.rc_parse function to parse a specific rc file
when your application starts.

As for the resource file syntax, I think you do best to read the
Resource Files chapter in section II of the GTK 2.0 API reference.

What you might want is something like this in one of the rc files:

style "win32-font"
{
  font_name = "tahoma 8"
}
class "*" style "win32-font"

As far as the overall look of the app, it is going to look like a GTK
app. Though I must say that the Raleigh look (default look of GTK 2.0)
is very clean and with the proper font might look close enough to
Windows to keep you happy.

The only "Windows" simulation theme that I know about is the redmond95
theme. This theme unchanged looks very close to Windows 95, but there
are slight differences. If you lighten the background color it looks
much more like Windows 98/2000 but it isn't perfect simulation. 


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to