public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Moses DeJong <dejong@cs.umn.edu>
To: insight@sourceware.cygnus.com
Subject: A font size patch for large screens.
Date: Wed, 11 Aug 1999 02:18:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.05.9908110416350.22063-100000@brin.cs.umn.edu> (raw)

Hi all.

I just downloaded and debugged my first program with insight. It looks
great, but the default font is much too small on my 1280x1000 laptop screen.
I have included a patch that adjusts the default font size based on the
height of the screen and adjust the range of the font size select widget.


Mo DeJong
dejong@cs.umn.edu






1999-08-11  Mo DeJong <dejong@cs.umn.edu>

        * gdb/gdbtcl2/globalpref.itb
          libgui/library/looknfeel.tcl : Use the screen height to determine
        the default font size. Adjust font selection widget range as well.



--- insight-19990809/gdb/gdbtcl2/globalpref.itb Sat Jul 17 00:32:46 1999
+++ ../insight-19990809/gdb/gdbtcl2/globalpref.itb      Wed Aug 11 03:13:14 1999@@ -113,7 +113,7 @@
   $frame.icons.cb configure -width $width


-  # searching for fixed font families take a long time
+  # searching for fixed font families can take a long time
   # therefore, we cache the font names.  The font cache
   # can be saved in the init file. A way should be provided
   # to rescan the font list, without deleting the entry from the
@@ -242,7 +242,10 @@
     $f.${name}n list insert end $a
   }

-  tixControl $f.${name}s -label Size: -integer true -max 18 -min 6 \
+  set fontmin [expr {$Original($name,size) * 2 / 3}]
+  set fontmax [expr {$Original($name,size) * 2}]
+
+  tixControl $f.${name}s -label Size: -integer true -max $fontmax -min $fontmin \
     -value $Original(${name},size) -command [code $this font_changed size $name]
   [$f.${name}s subwidget entry] configure -width 2
   label $f.${name}l -text ABCDEFabcdef0123456789 -font test-$name-font
--- insight-19990809/libgui/library/looknfeel.tcl       Sat Mar 28 04:08:47 1998+++ ../insight-19990809/libgui/library/looknfeel.tcl    Wed Aug 11 03:00:45 1999@@ -34,12 +34,21 @@
     eval define_font global/italic [array get actual]
     define_font global/menu -family windows-menu
   } else {
-    define_font global/default -family courier -size 9
-    define_font global/bold -family courier -size 9 -weight bold
-    define_font global/fixed -family courier -size 9
-    define_font global/status -family courier -size 9
-    define_font global/italic -family courier -size 9 -slant italic
-    define_font global/menu -family courier -size 9
+    set def_size 9
+    set screenheight [winfo screenheight .]
+    # if running on a really big display, increase the default font size
+    if {$screenheight > 1200} {
+      set def_size 20
+    } elseif {$screenheight > 1000} {
+      set def_size 16
+    }
+
+    define_font global/default -family courier -size $def_size
+    define_font global/bold -family courier -size $def_size -weight bold
+    define_font global/fixed -family courier -size $def_size
+    define_font global/status -family courier -size $def_size
+    define_font global/italic -family courier -size $def_size -slant italic
+    define_font global/menu -family courier -size $def_size
   }

   # Make sure this font is actually used by default.



             reply	other threads:[~1999-08-11  2:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-11  2:18 Moses DeJong [this message]
1999-08-11 10:36 ` James Ingham
1999-08-11 11:27   ` Moses DeJong
1999-08-11 11:55     ` James Ingham
1999-08-11 11:56     ` James Ingham

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=Pine.GSO.4.05.9908110416350.22063-100000@brin.cs.umn.edu \
    --to=dejong@cs.umn.edu \
    --cc=insight@sourceware.cygnus.com \
    /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).