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

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

Issue 2810403002: Views: Don't add insets for views::Link focus rings under MD. (Closed)
Patch Set: Add missing // namespace comments Created 3 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 | « chrome/browser/ui/views/harmony/layout_provider_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index f9c49d057a06de6fb275c0b6cf010742d922534e..0fa4db8923ee550fda3f2a2b63d59993e46acb9d 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -31,9 +31,6 @@ class VIEWS_EXPORT Label : public View,
// Internal class name.
static const char kViewClassName[];
- // The padding for the focus border when rendering focused text.
- static const int kFocusBorderPadding;
-
// Helper to construct a Label that doesn't use the views typography spec.
// Using this causes Label to obtain colors from ui::NativeTheme and line
// spacing from gfx::FontList::GetHeight().
@@ -206,7 +203,6 @@ class VIEWS_EXPORT Label : public View,
void SelectRange(const gfx::Range& range);
// View:
- gfx::Insets GetInsets() const override;
int GetBaseline() const override;
gfx::Size GetPreferredSize() const override;
gfx::Size GetMinimumSize() const override;
@@ -229,6 +225,10 @@ class VIEWS_EXPORT Label : public View,
gfx::DirectionalityMode directionality,
gfx::ElideBehavior elide_behavior) const;
+ // Draw a focus ring. The default implementation does nothing.
+ virtual void PaintFocusRing(gfx::Canvas* canvas) const;
+ gfx::Rect GetFocusRingBounds() const;
+
void PaintText(gfx::Canvas* canvas);
// View:
@@ -253,7 +253,7 @@ class VIEWS_EXPORT Label : public View,
FRIEND_TEST_ALL_PREFIXES(LabelTest, MultilineSupportedRenderText);
FRIEND_TEST_ALL_PREFIXES(LabelTest, TextChangeWithoutLayout);
FRIEND_TEST_ALL_PREFIXES(LabelTest, EmptyLabel);
- FRIEND_TEST_ALL_PREFIXES(LabelTest, FocusBounds);
+ FRIEND_TEST_ALL_PREFIXES(MDLabelTest, FocusBounds);
FRIEND_TEST_ALL_PREFIXES(LabelTest, MultiLineSizingWithElide);
friend class LabelSelectionTest;
@@ -297,8 +297,6 @@ class VIEWS_EXPORT Label : public View,
// Set up |lines_| to actually be painted.
void MaybeBuildRenderTextLines() const;
- gfx::Rect GetFocusBounds() const;
-
// Get the text broken into lines as needed to fit the given |width|.
std::vector<base::string16> GetLinesForWidth(int width) const;
« no previous file with comments | « chrome/browser/ui/views/harmony/layout_provider_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698