diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/views/controls/label.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/views/controls/label.h')
-rw-r--r-- | chromium/ui/views/controls/label.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chromium/ui/views/controls/label.h b/chromium/ui/views/controls/label.h index dc690b22dc2..5a45ef3cbf0 100644 --- a/chromium/ui/views/controls/label.h +++ b/chromium/ui/views/controls/label.h @@ -91,6 +91,11 @@ class VIEWS_EXPORT Label : public View, // a value from views::style::TextContext or an enum that extends it. int GetTextContext() const; + // The style of the label. This is a value from views::style::TextStyle or an + // enum that extends it. + int GetTextStyle() const; + void SetTextStyle(int style); + // Enables or disables auto-color-readability (enabled by default). If this // is enabled, then calls to set any foreground or background color will // trigger an automatic mapper that uses color_utils::BlendForMinContrast() @@ -177,6 +182,13 @@ class VIEWS_EXPORT Label : public View, bool GetAllowCharacterBreak() const; void SetAllowCharacterBreak(bool allow_character_break); + // For the provided line index, gets the corresponding rendered line and + // returns the text position of the first character of that line. + size_t GetTextIndexOfLine(size_t line) const; + + // Set the truncate length of the rendered text. + void SetTruncateLength(size_t truncate_length); + // Gets/Sets the eliding or fading behavior, applied as necessary. The default // is to elide at the end. Eliding is not well-supported for multi-line // labels. @@ -377,7 +389,7 @@ class VIEWS_EXPORT Label : public View, void BuildContextMenuContents(); const int text_context_; - const int text_style_; + int text_style_; // An un-elided and single-line RenderText object used for preferred sizing. std::unique_ptr<gfx::RenderText> full_text_; |