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

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

Issue 2810403002: Views: Don't add insets for views::Link focus rings under MD. (Closed)
Patch Set: Tests passing 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 | « no previous file | ui/views/controls/label.cc » ('j') | ui/views/controls/label.cc » ('J')
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..5ba8a180f795c657f4d54918611fa50f914eaf9c 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 MaybePaintFocusRing(gfx::Canvas* canvas) const;
sky 2017/04/19 17:27:46 We generally don't use 'maybe' for painting calls
tapted 2017/04/20 11:50:17 Done.
+ gfx::Rect GetFocusRingBounds() const;
+
void PaintText(gfx::Canvas* canvas);
// View:
@@ -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 | « no previous file | ui/views/controls/label.cc » ('j') | ui/views/controls/label.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698