view local/swingrc.scm @ 5:b67a33c44de7

Remove some crap, etc
author samer
date Fri, 05 Apr 2019 21:34:25 +0100
parents 5df24c91468d
children
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")
)

(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