Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: ui/gfx/canvas.h

Issue 14322007: Add line height setting to views::Label & use it for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index c7673bccd24ba8612ccbd17f76f3974d22d1bd89..65fc15654ccfbefc02fe18e24b94fbea5289a4e3 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -124,10 +124,12 @@ class UI_EXPORT Canvas {
// Compute the size required to draw some text with the provided font.
// Attempts to fit the text with the provided width and height. Increases
// height and then width as needed to make the text fit. This method
- // supports multiple lines.
+ // supports multiple lines. On Skia only a line_height can be specified and
+ // specifying a 0 value for it will cause the default height to be used.
static void SizeStringInt(const string16& text,
const gfx::Font& font,
int* width, int* height,
+ int line_height,
int flags);
// Returns the number of horizontal pixels needed to display the specified
@@ -322,11 +324,13 @@ class UI_EXPORT Canvas {
int flags);
// Similar to above DrawStringInt method but with text shadows support.
- // Currently it's only implemented for canvas skia.
+ // Currently it's only implemented for canvas skia. Specifying a 0 line_height
+ // will cause the default height to be used.
void DrawStringWithShadows(const string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& text_bounds,
+ int line_height,
int flags,
const ShadowValues& shadows);
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698