annotate local/swingrc.scm @ 8:5e3cbbf173aa tip

Reorganise some more
author samer
date Fri, 05 Apr 2019 22:41:58 +0100
parents 5df24c91468d
children
rev   line source
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@1 14 )
samer@0 15
samer@0 16 (samer.core.shells.SwingShell. (string-append lib "/jslab/local/user.props"))
samer@0 17
samer@0 18 ;; This is a theme for people using the Metal look and feel.
samer@0 19 (define (mytheme)
samer@0 20 (display "setting Metal theme\n")
samer@0 21 (javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme
samer@0 22 (samer.core.util.swing.SilkyMetalTheme.
samer@0 23 (X.font (Shell.datum "swing.font") "Dialog")
samer@0 24 (java.awt.Color.decode "#e4e1e4") 0.64))
samer@0 25 (javax.swing.UIManager.setLookAndFeel
samer@0 26 (javax.swing.plaf.metal.MetalLookAndFeel.)
samer@0 27 )
samer@0 28 )
samer@0 29
samer@0 30 ;; this is a theme for Mac users using the native Aqua look-and-feel
samer@0 31 (define (osxtheme)
samer@0 32 (define f (X.font (Shell.datum "swing.font") "Dialog"))
samer@0 33 (display "Setting OS X theme defaults\n")
samer@0 34 (for-each (lambda (x) (javax.swing.UIManager.put (string-append x ".font") f))
samer@0 35 '("Label" "TextField" "CheckBox" "CheckBoxMenuItem" "Button" "List" "Tree" "MenuItem"))
samer@0 36 (javax.swing.UIManager.put "TitledBorder.font"
samer@0 37 (.deriveFont f java.awt.Font.BOLD$))
samer@0 38 )
samer@0 39
samer@0 40 (import "samer.tools.*")
samer@0 41
samer@0 42 (load "shell.scm")
samer@0 43 (load "task.scm")
samer@0 44 (load "color.scm")
samer@0 45
samer@0 46 (import "samer.maths.*")
samer@0 47 (import "samer.functions.*")
samer@0 48 (import "samer.units.*")
samer@0 49
samer@0 50 (samer.core.util.Tools.setAntialias #t)
samer@0 51 (osxtheme) ; I'm using a Mac