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

Unified Diff: ui/views/controls/styled_label.h

Issue 147533005: [Password Generation] Update UI to match final mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_password_generation_ui
Patch Set: Created 6 years, 10 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
Index: ui/views/controls/styled_label.h
diff --git a/ui/views/controls/styled_label.h b/ui/views/controls/styled_label.h
index f600159ee3466c09f7e5039720ea5f4cc64e3c76..aa322f15efdce96bf38b2227d176a85d57fad9ae 100644
--- a/ui/views/controls/styled_label.h
+++ b/ui/views/controls/styled_label.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/font_list.h"
#include "ui/gfx/range/range.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/link_listener.h"
@@ -60,6 +61,9 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// Sets the text to be displayed, and clears any previous styling.
void SetText(const base::string16& text);
+ // Sets the fonts used by all labels.
+ void SetFontList(const gfx::FontList& font_list);
+
// Marks the given range within |text_| with style defined by |style_info|.
// |range| must be contained in |text_|.
void AddStyleRange(const gfx::Range& range, const RangeStyleInfo& style_info);
@@ -114,6 +118,9 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// The text to display.
base::string16 text_;
+ // Fonts used to display text. Can be augmented by RangeStyleInfo.
+ gfx::FontList font_list_;
+
// The default style to use for any part of the text that isn't within
// a range in |style_ranges_|.
RangeStyleInfo default_style_info_;

Powered by Google App Engine
This is Rietveld 408576698