diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 18:54:50 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 18:54:50 +0000 |
commit | c8a5c738737660e788c6f30455406546362cace1 (patch) | |
tree | 74f4519ea7d7c18c0e847d3d529086e91ee80a71 /webkit/gpu | |
parent | ebb54a416dd427df5f2c51eb71ac89f1a7e936dc (diff) | |
download | chromium_src-c8a5c738737660e788c6f30455406546362cace1.zip chromium_src-c8a5c738737660e788c6f30455406546362cace1.tar.gz chromium_src-c8a5c738737660e788c6f30455406546362cace1.tar.bz2 |
linux: Make PlatformFontGtk deal only in pixels.
gfx::Font deals with pixels (at least, its GetFontSize()
method is documented as returning them and that's what all
of the metrics-related methods return; I'm assuming that the
|font_size| argument in its constructors deals with the
same units). PlatformFontGtk's constructor treated
|font_size| as points, though, and mostly used points
internally.
This change makes PlatformFontGtk use pixels internally and
renames all of the variables to describe their units.
It also changes the size of the omnibox suggestion text:
- on Chrome OS, it matches the size of the omnibox text
- on Linux, it's slightly smaller (similar to Windows)
It also makes us update the suggestion text size when
switching between standard and GTK+ themes (the omnibox
itself already handled this correctly).
Tested with the following configurations in a regular GTK+
build:
120 DPI, GTK+ theme:
- 13-pixel tab text
- 16-pixel omnibox text
- 13-pixel omnibox popup text
- 16-pixel popup location text
96 DPI, GTK+ theme:
- 13-pixel tab text
- 13-pixel omnibox popup text
- 12-pixel omnibox popup text
- 13-pixel popup location text
72 DPI, GTK+ theme:
- 13-pixel tab text
- 9-pixel omnibox popup text
- 9-pixel omnibox popup text
- 9-pixel popup location text
120 DPI, Classic theme:
- 13-pixel tab text
- 13-pixel omnibox text
- 12-pixel omnibox popup text
- 10-pixel popup location text
96 DPI, Classic theme:
- 13-pixel tab text
- 13-pixel omnibox text
- 12-pixel omnibox popup text
- 10-pixel popup location text
72 DPI, Classic theme:
- 13-pixel tab text
- 13-pixel omnibox text
- 12-pixel omnibox popup text
- 10-pixel popup location text
Put more simply:
- Regular themes use hardcoded font sizes.
- The GTK+ theme uses a hardcoded font size for tabs and
sizes based on the DPI for the omnibox.
BUG=61433,26354,chromium-os:8658
TEST=see above. also took screenshots and checked that the onscreen font size matches that passed to gfx::Font and that the computed metrics are correct, and built a Chrome OS image to verify that things look reasonable, and verified that text isn't clipped on the "Aw, Snap!" page
Review URL: http://codereview.chromium.org/6378007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
0 files changed, 0 insertions, 0 deletions