[racket-dev] racket/gui checkbox clips text

From: Richard Hopkins (richhguard-monotone at yahoo.co.uk)
Date: Tue Dec 10 13:56:02 EST 2013

Using the DrRacket nightly build for 2013-12-09, checkboxes in the Preferences dialog have the text clipped.

It appears as though there isn't enough space to fit the text on 1 line, so it renders 2 lines. However, the top of the 1st
line and bottom of the 2nd line is rendered outside the client area for the checkbox. This issue is not specific to DrRacket
and can be reproduced using

#lang racket/gui
(define frame (new frame% [label "Example"]))

(define check-box (new check-box%
                       (parent frame)
                       (label "A check box with a really long label to see if it still works and does not truncate any text.")
                       (value #t)))

(send frame show #t)

I think all of the following must be true to reproduce the issue:

* racket/gui later than 5.3.6;
* run on Windows; and

* have DPI set larger than the Windows default.

Regarding the DPI issue, this can be changed via the 'Personalize' menu item from the Desktop and selecting the "Make text appear larger (125%)" item for example.
A log off and on is required for the change to apply.

Broken example:
2013-12-09 nightly on Windows 7 with text set to 125%.

Working examples:
5.3.6 on Windows 7 with text set to 125%.
2013-12-09 nightly on Windows 8 with text set to 100%
5.3.6 on Linux with GTK and default DPI
2013-12-09 nightly on Linux with GTK and default DPI

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20131210/51c4adf9/attachment.html>

Posted on the dev mailing list.