samer@0
|
1 ;;; Mac OS X only
|
samer@0
|
2 ;;;
|
samer@0
|
3 ; Properties documented here:
|
samer@0
|
4 ; http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html
|
samer@0
|
5 (let ((sp System.setProperty))
|
samer@0
|
6 (sp "apple.laf.useScreenMenuBar" "true")
|
samer@0
|
7 ;(sp "apple.awt.brushMetalLook" "true")
|
samer@0
|
8 ;(sp "apple.awt.antialiasing" "off")
|
samer@0
|
9 ;(sp "apple.awt.textantialiasing" "on")
|
samer@0
|
10 (sp "apple.awt.rendering" "speed") ; speed quality
|
samer@0
|
11 ;(sp "apple.awt.interpolation" "bicubic"); nearestneighbor bilinear bicubic
|
samer@0
|
12 ;(sp "apple.awt.graphics.UseQuartz" "false")
|
samer@0
|
13 ;(sp "apple.awt.showGrowBox" "true")
|
samer@0
|
14
|
samer@0
|
15 ;;; older options, not working as of Java 6
|
samer@0
|
16 ;(sp "com.apple.mrj.application.apple.menu.about.name" "JSLab")
|
samer@0
|
17 ;(sp "com.apple.mrj.application.growbox.intrudes" "false")
|
samer@0
|
18 ;(sp "com.apple.mrj.application.live-resize" "false")
|
samer@0
|
19 ;(sp "com.apple.macosx.AntialiasedGraphicsOn" "false")
|
samer@0
|
20 ;(sp "com.apple.macos.useScreenMenuBar" "true")
|
samer@0
|
21 ;(sp "com.apple.hwaccel" "true")
|
samer@0
|
22 )
|
samer@0
|
23
|
samer@0
|
24 (samer.core.shells.SwingShell. (string-append lib "/jslab/local/user.props"))
|
samer@0
|
25
|
samer@0
|
26 ;; This is a theme for people using the Metal look and feel.
|
samer@0
|
27 (define (mytheme)
|
samer@0
|
28 (display "setting Metal theme\n")
|
samer@0
|
29 (javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme
|
samer@0
|
30 (samer.core.util.swing.SilkyMetalTheme.
|
samer@0
|
31 (X.font (Shell.datum "swing.font") "Dialog")
|
samer@0
|
32 (java.awt.Color.decode "#e4e1e4") 0.64))
|
samer@0
|
33 (javax.swing.UIManager.setLookAndFeel
|
samer@0
|
34 (javax.swing.plaf.metal.MetalLookAndFeel.)
|
samer@0
|
35 )
|
samer@0
|
36 )
|
samer@0
|
37
|
samer@0
|
38 ;; this is a theme for Mac users using the native Aqua look-and-feel
|
samer@0
|
39 (define (osxtheme)
|
samer@0
|
40 (define f (X.font (Shell.datum "swing.font") "Dialog"))
|
samer@0
|
41 (display "Setting OS X theme defaults\n")
|
samer@0
|
42 (for-each (lambda (x) (javax.swing.UIManager.put (string-append x ".font") f))
|
samer@0
|
43 '("Label" "TextField" "CheckBox" "CheckBoxMenuItem" "Button" "List" "Tree" "MenuItem"))
|
samer@0
|
44 (javax.swing.UIManager.put "TitledBorder.font"
|
samer@0
|
45 (.deriveFont f java.awt.Font.BOLD$))
|
samer@0
|
46 )
|
samer@0
|
47
|
samer@0
|
48 (import "samer.tools.*")
|
samer@0
|
49
|
samer@0
|
50 (load "shell.scm")
|
samer@0
|
51 (load "task.scm")
|
samer@0
|
52 (load "color.scm")
|
samer@0
|
53
|
samer@0
|
54 (import "samer.maths.*")
|
samer@0
|
55 (import "samer.functions.*")
|
samer@0
|
56 (import "samer.units.*")
|
samer@0
|
57
|
samer@0
|
58 (samer.core.util.Tools.setAntialias #t)
|
samer@0
|
59 (osxtheme) ; I'm using a Mac
|
samer@0
|
60
|
samer@0
|
61
|