From a2157b86dc051d46ac438faf198593bfd4bf0cb3 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 17 Sep 2012 16:39:27 -0400 Subject: [PATCH] Rackety and minor edits. --- .../gui/taking-screenshots/instructions | 8 ++--- collects/scribblings/gui/widget-gallery.rkt | 30 +++++++++---------- collects/scribblings/gui/widget-gallery.scrbl | 7 ++++- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/collects/scribblings/gui/taking-screenshots/instructions b/collects/scribblings/gui/taking-screenshots/instructions index 98167cfd45..f6dc05bc7f 100644 --- a/collects/scribblings/gui/taking-screenshots/instructions +++ b/collects/scribblings/gui/taking-screenshots/instructions @@ -1,12 +1,12 @@ -*- org -*- * 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 + 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 @@ -22,7 +22,7 @@ + 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 and some tweaking might be necessary to make it work in different diff --git a/collects/scribblings/gui/widget-gallery.rkt b/collects/scribblings/gui/widget-gallery.rkt index 8c38419664..6efb6dcb0b 100644 --- a/collects/scribblings/gui/widget-gallery.rkt +++ b/collects/scribblings/gui/widget-gallery.rkt @@ -1,18 +1,16 @@ -(module widget scheme/base - (require racket/string - "common.rkt") +#lang racket/base +(require racket/string + "common.rkt") - (provide showcase-widget) +(provide showcase-widget) - (define-syntax showcase-widget - (syntax-rules () - ((_ widget code ...) - (begin - (racketlink widget - (image #:suffixes - (list ".png") - (string-append "image/" - (string-trim (symbol->string 'widget) - "%" - #:left? #f)))) - (racketblock code ...)))))) +(define-syntax-rule (showcase-widget widget code ...) + (begin + (racketlink widget + (image #:suffixes + (list ".png") + (string-append "image/" + (string-trim (symbol->string 'widget) + "%" + #:left? #f)))) + (racketblock code ...))) diff --git a/collects/scribblings/gui/widget-gallery.scrbl b/collects/scribblings/gui/widget-gallery.scrbl index 37c35ae496..e4c2c049b6 100644 --- a/collects/scribblings/gui/widget-gallery.scrbl +++ b/collects/scribblings/gui/widget-gallery.scrbl @@ -4,7 +4,12 @@ @title[#:style '(toc quiet)]{Widget Gallery} -This section gives an overview of the main widgets available in the Racket Graphical Interface Toolkit and each image points to its full documentation. +@; Note: Instructions for taking widget screenshots are avaiable at: +@; ./taking-screenshots/instructions + +This section shows the main widgets available in the Racket Graphical User +Interface Toolkit. Each image is a link to the documentation of the relevant +widget. @(showcase-widget button% (define button (new button%