samer@0: ;;; Mac OS X only samer@0: ;;; samer@0: ; Properties documented here: samer@0: ; http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html samer@0: (let ((sp System.setProperty)) samer@0: (sp "apple.laf.useScreenMenuBar" "true") samer@0: ;(sp "apple.awt.brushMetalLook" "true") samer@0: ;(sp "apple.awt.antialiasing" "off") samer@0: ;(sp "apple.awt.textantialiasing" "on") samer@0: (sp "apple.awt.rendering" "speed") ; speed quality samer@0: ;(sp "apple.awt.interpolation" "bicubic"); nearestneighbor bilinear bicubic samer@0: ;(sp "apple.awt.graphics.UseQuartz" "false") samer@0: ;(sp "apple.awt.showGrowBox" "true") samer@1: ) samer@0: samer@0: (samer.core.shells.SwingShell. (string-append lib "/jslab/local/user.props")) samer@0: samer@0: ;; This is a theme for people using the Metal look and feel. samer@0: (define (mytheme) samer@0: (display "setting Metal theme\n") samer@0: (javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme samer@0: (samer.core.util.swing.SilkyMetalTheme. samer@0: (X.font (Shell.datum "swing.font") "Dialog") samer@0: (java.awt.Color.decode "#e4e1e4") 0.64)) samer@0: (javax.swing.UIManager.setLookAndFeel samer@0: (javax.swing.plaf.metal.MetalLookAndFeel.) samer@0: ) samer@0: ) samer@0: samer@0: ;; this is a theme for Mac users using the native Aqua look-and-feel samer@0: (define (osxtheme) samer@0: (define f (X.font (Shell.datum "swing.font") "Dialog")) samer@0: (display "Setting OS X theme defaults\n") samer@0: (for-each (lambda (x) (javax.swing.UIManager.put (string-append x ".font") f)) samer@0: '("Label" "TextField" "CheckBox" "CheckBoxMenuItem" "Button" "List" "Tree" "MenuItem")) samer@0: (javax.swing.UIManager.put "TitledBorder.font" samer@0: (.deriveFont f java.awt.Font.BOLD$)) samer@0: ) samer@0: samer@0: (import "samer.tools.*") samer@0: samer@0: (load "shell.scm") samer@0: (load "task.scm") samer@0: (load "color.scm") samer@0: samer@0: (import "samer.maths.*") samer@0: (import "samer.functions.*") samer@0: (import "samer.units.*") samer@0: samer@0: (samer.core.util.Tools.setAntialias #t) samer@0: (osxtheme) ; I'm using a Mac