From e4f03a404595f3c886110f55a50542bc8e3fe3ec Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 19 Sep 2012 23:04:25 -0400 Subject: [PATCH] Improvements to "meta/images/taking-screenshots". Improve text layout and avoid enforcing org-mode, improve the racket script. --- .../images/taking-screenshots/instructions | 36 ++++++++++++------- .../meta/images/taking-screenshots/widget.rkt | 24 ++++++------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/collects/meta/images/taking-screenshots/instructions b/collects/meta/images/taking-screenshots/instructions index f6dc05bc7f..b48d7cf196 100644 --- a/collects/meta/images/taking-screenshots/instructions +++ b/collects/meta/images/taking-screenshots/instructions @@ -1,38 +1,50 @@ --*- org -*- +Important: before you add a bunch of images or modify a bunch of +existing ones to reflect some minor gui change in your theme, consider +the fact that binary files changes have a heavy cost in terms of +repository size and performance. Please minimize the number of such +commits (ie, prefer a single big commit over many smaller ones, avoid +committing files that are not "stable"). * Using GIMP To take screen shots of the widgets, you can follow these steps: 1. Take a widget screen shot + 2. Open it with GIMP + 3. Cut it to 240 x 73 + 4. Add a border using Filters/Decor/Add Border... + Border X size :: 1 + Border Y size :: 1 + Border color :: black + Delta value on color :: 25 + 5. Combine all layers - 6. Add a drop shadow using Filters/Light and Shadow/Drop - Shadow... + + 6. Add a drop shadow using Filters/Light and Shadow/Drop Shadow... + Offset X :: 8 + Offset Y :: 8 + Blur radius :: 9 + Color :: black + Opacity :: 80 + Allow resizing :: #t + 7. Save as .png There are two scripts in this directory that might help in this - process. Keep in mind though that the GIMP script is very fragile + process. Keep in mind though that the GIMP script is very fragile and some tweaking might be necessary to make it work in different setups. - + [[file:widget.rkt][widget.rkt]] :: Creates a "canvas" panel with a border, so it is - easier to select the widget area using GIMP's Fuzzy - Select Tool - + [[file:racket-widget.scm][racket-widget.scm]] :: GIMP's script which, when invoked, asks for a - window to take a screen shot and do the post production to the - image. This script should be put inside a specific directory, - here being `~/.gimp-2.6/scripts', and should be invoked at - File/Create/Racket Widget. + + [[file:widget.rkt][widget.rkt]] :: + Creates a "canvas" panel with a border, so it is easier to select + the widget area using GIMP's Fuzzy Select Tool + + + [[file:racket-widget.scm][racket-widget.scm]] :: + GIMP's script which, when invoked, asks for a window to take a + screen shot and do the post production to the image. This script + should be put inside a specific directory, here being + "~/.gimp-2.6/scripts", and should be invoked at File/Create/Racket + Widget. diff --git a/collects/meta/images/taking-screenshots/widget.rkt b/collects/meta/images/taking-screenshots/widget.rkt index fd3cfc2396..f5ff8692c4 100644 --- a/collects/meta/images/taking-screenshots/widget.rkt +++ b/collects/meta/images/taking-screenshots/widget.rkt @@ -2,17 +2,13 @@ (provide showcase) -(define showcase (lambda (#:hmult (hmult 1) . name) - (define frame (new frame% (label (if (null? name) - "widget" - (car name))))) - (define panel (new panel% (parent frame))) - (define showcase-panel (new horizontal-panel% - (parent panel) - (alignment '(center center)) - (style '(border)) - (min-width 242) - (min-height (* hmult 75)) - (border 20))) - (send frame show #t) - showcase-panel)) +(define (showcase [name "widget"] #:hmult (hmult 1)) + (define frame (new frame% [label name])) + (define panel (new panel% [parent frame])) + (define showcase-panel + (new horizontal-panel% + [parent panel] [alignment '(center center)] + [min-width 242] [min-height (* hmult 75)] + [style '(border)] [border 20])) + (send frame show #t) + showcase-panel)