From ac0e37e0e1725f613da63e6b4bf3e7c201677a61 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 26 Mar 2011 10:52:50 -0500 Subject: [PATCH] adjusted the color preferences button placement to avoid such a wide prefs dialog original commit: fe75ed9a396c295c6c3a693ad17a64fed739a104 --- collects/framework/private/color-prefs.rkt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/collects/framework/private/color-prefs.rkt b/collects/framework/private/color-prefs.rkt index 957b4aba..6fdfa203 100644 --- a/collects/framework/private/color-prefs.rkt +++ b/collects/framework/private/color-prefs.rkt @@ -28,6 +28,7 @@ (define hp (new horizontal-panel% [parent parent] [style '(border)] + [alignment '(center top)] [stretchable-height #f])) (define e (new (class standard-style-list-text% @@ -43,6 +44,7 @@ [parent hp] [min-width 150] [editor e] + [stretchable-height #t] [style '(hide-hscroll hide-vscroll)])) (define (make-check name on off) @@ -118,13 +120,22 @@ (list-ref smoothing-options (send c get-selection))))))])) + (define fore/back-panel + (and background? + (new vertical-pane% + [parent hp] + [stretchable-width #f] + [stretchable-height #f]))) + (define foreground-color-button (and (>= (get-display-depth) 8) (new button% [label (if background? (string-constant cs-foreground-color) (string-constant cs-change-color))] - [parent hp] + [parent (if background? + fore/back-panel + hp)] [callback (λ (color-button evt) (let* ([add (send (preferences:get pref-sym) get-foreground-add)] @@ -146,7 +157,9 @@ background? (new button% [label (string-constant cs-background-color)] - [parent hp] + [parent (if background? + fore/back-panel + hp)] [callback (λ (color-button evt) (let* ([add (send (preferences:get pref-sym) get-background-add)]