OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libgui/] [library/] [looknfeel.tcl] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# looknfeel.tcl - Standard look and feel decisions.
2
# Copyright (C) 1997 Cygnus Solutions.
3
# Written by Tom Tromey <tromey@cygnus.com>.
4
 
5
# Run this once just after Tk is initialized.  It will do whatever
6
# setup is required to make the application conform to our look and
7
# feel.
8
proc standard_look_and_feel {} {
9
  global tcl_platform
10
 
11
  # FIXME: this is really gross: we know how tk_dialog chooses its
12
  # -wraplength, and we make it bigger.  Instead we should make our
13
  # own dialog function.
14
  option add *Dialog.msg.wrapLength 0 startupFile
15
 
16
  # We don't ever want tearoffs.
17
  option add *Menu.tearOff 0 startupFile
18
 
19
  # The default font should be used by default.
20
  # The bold font is like the default font, but is bold; use it for
21
  # emphasis.
22
  # The fixed font is guaranteed not to be proportional.
23
  # The status font should be used in status bars and tooltips.
24
  if {$tcl_platform(platform) == "windows"} then {
25
    define_font global/default -family windows-message
26
    # FIXME: this isn't actually a bold font...
27
    define_font global/bold -family windows-caption
28
    define_font global/fixed -family fixedsys
29
    define_font global/status -family windows-status
30
    # FIXME: we'd like this font to update automatically as well.  But
31
    # for now we can't.
32
    array set actual [font actual windows-message]
33
    set actual(-slant) italic
34
    eval define_font global/italic [array get actual]
35
    define_font global/menu -family windows-menu
36
  } else {
37
    define_font global/default -family courier -size 9
38
    define_font global/bold -family courier -size 9 -weight bold
39
    define_font global/fixed -family courier -size 9
40
    define_font global/status -family courier -size 9
41
    define_font global/italic -family courier -size 9 -slant italic
42
    define_font global/menu -family courier -size 9
43
  }
44
 
45
  # Make sure this font is actually used by default.
46
  option add *Font global/default
47
  option add *Menu.Font global/menu
48
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.