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

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

Issue 92004: Fix focus rects for checkboxes and radio buttons:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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/views/controls/button/radio_button.cc ('k') | chrome/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/controls/label.h
===================================================================
--- chrome/views/controls/label.h (revision 14145)
+++ chrome/views/controls/label.h (working copy)
@@ -153,6 +153,9 @@
// Sets the enabled state. Setting the enabled state resets the color.
virtual void SetEnabled(bool enabled);
+ // Overridden from View:
+ virtual gfx::Insets GetInsets() const;
+
// Resizes the label so its width is set to the width of the longest line and
// its height deduced accordingly.
// This is only intended for multi-line labels and is useful when the label's
@@ -184,6 +187,10 @@
void set_collapse_when_hidden(bool value) { collapse_when_hidden_ = value; }
bool collapse_when_hidden() const { return collapse_when_hidden_; }
+ void set_paint_as_focused(bool paint_as_focused) {
+ paint_as_focused_ = paint_as_focused;
+ }
+
private:
// These tests call CalculateDrawStringParams in order to verify the
// calculations done for drawing text.
@@ -231,6 +238,9 @@
// needs to be flipped around for RTL locales. Please refer to the definition
// of RTLAlignmentMode for more information.
RTLAlignmentMode rtl_alignment_mode_;
+ // When embedded in a larger control that is focusable, setting this flag
+ // allows this view to be painted as focused even when it is itself not.
+ bool paint_as_focused_;
DISALLOW_COPY_AND_ASSIGN(Label);
};
« no previous file with comments | « chrome/views/controls/button/radio_button.cc ('k') | chrome/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698