diff options
author | olpc <olpc@xo-05-25-69.localdomain> | 2010-02-21 23:19:58 (GMT) |
---|---|---|
committer | olpc <olpc@xo-05-25-69.localdomain> | 2010-02-21 23:19:58 (GMT) |
commit | f1c594f45dea6580b3bfb50a47c0ac58a94b80f7 (patch) | |
tree | d1126f5de3cd2b375dfd973505b1586c8b5494e1 | |
parent | 6881092e4771758e175a73de43bc464bb2ee1fa0 (diff) |
Fine-tune default font displays through XO-1.5 and SoaS Blueberry
-rw-r--r-- | csndsugui.py | 21 | ||||
-rw-r--r-- | ourmusicmc.py | 5 |
2 files changed, 22 insertions, 4 deletions
diff --git a/csndsugui.py b/csndsugui.py index d7c72f5..d97e279 100644 --- a/csndsugui.py +++ b/csndsugui.py @@ -47,11 +47,23 @@ class BasicGUI: def scale_font(self, widget): font = widget.get_pango_context().get_font_description() - font_size = font.get_size() + +# The FONT DISPLAY in this activity can be resized (smaller or larger) +# by changing the value of "resize" below. "Resize" can be positive +# or negative, and is not limited to integers. A value of 1 equals a +# point in font size. + resize = 0 + + font_size = font.get_size() + (resize * 1024) width = gtk.gdk.screen_width() - mult = width * .0008 - if os.path.exists("/etc/fedora-release") and open("/etc/fedora-release").read().find("Strawberry")!= -1: - mult = width * .0013 + mult = width * .00076 + if os.path.exists("/etc/olpc-release") or os.path.exists("/etc/power/olpc-pm"): + mult = width * .00082 + elif os.path.exists("/etc/fedora-release"): + if open("/etc/fedora-release").read().find("Strawberry") != -1: + mult = width * .00132 + elif open("/etc/fedora-release").read().find("Blueberry") != -1: + mult = width * .00085 font.set_size(int(font_size * mult)) widget.modify_font(font) @@ -795,3 +807,4 @@ class CsoundGUI(BasicGUI): self.arglist = None self.replay = False self.stopcb = True + diff --git a/ourmusicmc.py b/ourmusicmc.py index f8dad40..888ccb3 100644 --- a/ourmusicmc.py +++ b/ourmusicmc.py @@ -55,6 +55,10 @@ # Network). Stereo headphones (an inexpensive set will work fine) or # external amplifier/speaker system are highly recommended. # +# The font display of this activity can be resized in csndsugui.py, +# using any text editor. Further instructions are found toward the +# beginning of csndsugui.py. +# # OurMusicMC (Multiple Controller) requires Csound5.10 or later, and # Python2.6. @@ -149,6 +153,7 @@ zero controls before start. \ but4 = win.cbbutton(nbox, self.version4, "4 OurMusicASCII") but4.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0x7700, 0)) but4.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.Color(0, 0x7700, 0)) + win.text(" <b>MIDI DEVICE REQUIRED</b> for 1 & 3", nbox, brown) bbox = win.box(False, all) self.bb = bbox self.w = win |