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

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

Issue 1924893003: Views: Replace View::focusable() with View::focus_behavior(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Created 4 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/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 8d46029a8041d452e6a702a0e891fe843c6b2aba..bf26f1e8be52fb18a1bcea5a9a7f075042561181 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -213,7 +213,7 @@ base::string16 Label::GetDisplayTextForTesting() {
gfx::Insets Label::GetInsets() const {
gfx::Insets insets = View::GetInsets();
- if (focusable()) {
+ if (focus_behavior() == FocusBehavior::ALWAYS) {
insets += gfx::Insets(kFocusBorderPadding, kFocusBorderPadding,
kFocusBorderPadding, kFocusBorderPadding);
}
@@ -435,7 +435,7 @@ void Label::MaybeBuildRenderTextLines() {
return;
gfx::Rect rect = GetContentsBounds();
- if (focusable())
+ if (focus_behavior() == FocusBehavior::ALWAYS)
rect.Inset(kFocusBorderPadding, kFocusBorderPadding);
if (rect.IsEmpty())
return;
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698