Skip to content
Snippets Groups Projects
Commit 12309799 authored by xiyuan@chromium.org's avatar xiyuan@chromium.org
Browse files

ChromeOS status text halo polish.

- Fix the spikes on text of certain font by using round line join
  instead of default mitter join;
- Use the same 0.7 black as other icons instead of 1.0 black;

BUG=chromium-os:9787
TEST=Verify fix for chromium-os:9787

Review URL: http://codereview.chromium.org/5522007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68255 0039d316-1c4b-4281-b951-d872f2087c98
parent 714a498f
No related merge requests found
......@@ -12,6 +12,9 @@
namespace chromeos {
// A 0.7 black to decorate status text. Same color is used for icon borders.
static const SkColor kStatusTextHaloColor = SkColorSetARGB(0xB3, 0, 0, 0);
////////////////////////////////////////////////////////////////////////////////
// StatusAreaButton
......@@ -23,8 +26,8 @@ StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate)
// Use an offset that is top aligned with toolbar.
set_menu_offset(0, 2);
// Use a black halo for status text.
SetTextHaloColor(SK_ColorBLACK);
// Use a halo for status text as the icons.
SetTextHaloColor(kStatusTextHaloColor);
}
void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) {
......
......@@ -278,6 +278,7 @@ void DrawStringContext::DrawWithHalo(const SkColor& text_color,
SkColorGetB(halo_color) / 255.0,
SkColorGetA(halo_color) / 255.0);
cairo_set_line_width(text_cr, 2.0);
cairo_set_line_join(text_cr, CAIRO_LINE_JOIN_ROUND);
cairo_stroke_preserve(text_cr);
cairo_set_operator(text_cr, CAIRO_OPERATOR_SOURCE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment