Mercurial > hg > jslab
view local/swingrc.scm @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children | 5df24c91468d |
line wrap: on
line source
;;; Mac OS X only ;;; ; Properties documented here: ; http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html (let ((sp System.setProperty)) (sp "apple.laf.useScreenMenuBar" "true") ;(sp "apple.awt.brushMetalLook" "true") ;(sp "apple.awt.antialiasing" "off") ;(sp "apple.awt.textantialiasing" "on") (sp "apple.awt.rendering" "speed") ; speed quality ;(sp "apple.awt.interpolation" "bicubic"); nearestneighbor bilinear bicubic ;(sp "apple.awt.graphics.UseQuartz" "false") ;(sp "apple.awt.showGrowBox" "true") ;;; older options, not working as of Java 6 ;(sp "com.apple.mrj.application.apple.menu.about.name" "JSLab") ;(sp "com.apple.mrj.application.growbox.intrudes" "false") ;(sp "com.apple.mrj.application.live-resize" "false") ;(sp "com.apple.macosx.AntialiasedGraphicsOn" "false") ;(sp "com.apple.macos.useScreenMenuBar" "true") ;(sp "com.apple.hwaccel" "true") ) (samer.core.shells.SwingShell. (string-append lib "/jslab/local/user.props")) ;; This is a theme for people using the Metal look and feel. (define (mytheme) (display "setting Metal theme\n") (javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme (samer.core.util.swing.SilkyMetalTheme. (X.font (Shell.datum "swing.font") "Dialog") (java.awt.Color.decode "#e4e1e4") 0.64)) (javax.swing.UIManager.setLookAndFeel (javax.swing.plaf.metal.MetalLookAndFeel.) ) ) ;; this is a theme for Mac users using the native Aqua look-and-feel (define (osxtheme) (define f (X.font (Shell.datum "swing.font") "Dialog")) (display "Setting OS X theme defaults\n") (for-each (lambda (x) (javax.swing.UIManager.put (string-append x ".font") f)) '("Label" "TextField" "CheckBox" "CheckBoxMenuItem" "Button" "List" "Tree" "MenuItem")) (javax.swing.UIManager.put "TitledBorder.font" (.deriveFont f java.awt.Font.BOLD$)) ) (import "samer.tools.*") (load "shell.scm") (load "task.scm") (load "color.scm") (import "samer.maths.*") (import "samer.functions.*") (import "samer.units.*") (samer.core.util.Tools.setAntialias #t) (osxtheme) ; I'm using a Mac