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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 1645013004: Views - dialog button defaultness shouldn't follow focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile Created 4 years, 11 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 | « ui/views/controls/button/custom_button.cc ('k') | ui/views/window/dialog_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 978a5afb6e4c539ab5f941ba0771d691a76fefe7..bc8bf5d5b3c0e55e3768d144ca060bdf2e3da682 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -181,11 +181,7 @@ void LabelButton::SetIsDefault(bool is_default) {
if (style_ == STYLE_BUTTON) {
label_->SetFontList(
is_default ? cached_bold_font_list_ : cached_normal_font_list_);
- // Usually this function is called before |this| is attached to a widget,
- // but in the cases where |this| is already shown, we need to re-layout
- // because font boldness affects the label's size.
- if (GetWidget())
- Layout();
+ InvalidateLayout();
}
}
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/window/dialog_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698