Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(34)

Issue 6849099: Double the size of the tick when devdrawretina is set

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by robkroeger
Modified:
13 years, 1 month ago
Reviewers:
rsc
CC:
codebot
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -5 lines) Patch
M include/frame.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/libframe/frdraw.c View 1 chunk +1 line, -1 line 0 comments Download
M src/libframe/frinit.c View 4 chunks +15 lines, -4 lines 0 comments Download

Messages

Total messages: 4
robkroeger
13 years, 1 month ago (2012-11-25 22:56:30 UTC) #1
robkroeger
This change makes the tick twice as thick in retina mode. Please take a look. ...
13 years, 1 month ago (2012-11-25 23:03:49 UTC) #2
rsc
Indeed. I attached a clumsy patch to https://bitbucket.org/rsc/plan9port/issue/107/devdraw-macbook-retina-support that does most of the necessary expansion ...
13 years, 1 month ago (2012-11-26 03:37:50 UTC) #3
rsc
13 years, 1 month ago (2012-11-26 05:25:09 UTC) #4
I had a little more time so I prototyped a bit more of this. If you
sync and rebuild, you'll get a sequence of CLs that:

1) sets display->dpi to 220 on retina, 110 on non-retina. That's not
perfect, and I'd welcome a CL that produces true values, but it is
pretty close
(http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple;
http://codereview.appspot.com/6782115).

2) interprets Cmd-R keystroke to toggle "opposite of current dpi"
mode. So if you're on a retina display, Cmd-R makes it seem like you
just moved the window to a non-retina display, and vice versa. The
effect of Cmd-R is to change the value of display->dpi and trigger a
resize event. (http://codereview.appspot.com/6846104)

3) adjust libframe's tick images automatically when display->dpi
changes (http://codereview.appspot.com/6850102)

4) calculate samterm's and 9term's scroll bar and border widths using
scalesize (http://codereview.appspot.com/6847105,
http://codereview.appspot.com/6844083)

The effect of the sequence is that you can start 9term or sam and sit
there hitting Cmd-R and watch the tick and scroll bar grow and shrink.

Ultimately all the UI elements should adjust like that. The demo shows
that it is possible, but it will require work in every program with
fixed-size elements, and converting acme will be a bit more work than
converting sam. And this doesn't tackle fonts at all.

Unfortunately, this obsoletes the CL you sent, which I apologize for.
I would gladly welcome CLs that adapt other tools or that fix the DPI
calculation.

Thanks.
Russ

P.S. I also changed DefaultDPI to 133, because it seemed nicer. I
expect that to take a few iterations.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b