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

Unified Diff: ui/message_center/views/bounded_label.cc

Issue 271773002: Retain popup bubble mouse status even through updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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/message_center/views/bounded_label.h ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/bounded_label.cc
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 9a39fb55bbef54da6052f4246dda459352e76651..8d43f410204e15ea9bc1f6e3ff440649d6966ece 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -43,6 +43,9 @@ class InnerBoundedLabel : public views::Label {
gfx::Size GetSizeForWidthAndLines(int width, int lines);
std::vector<base::string16> GetWrappedText(int width, int lines);
+ // Overridden from views::Label.
+ virtual void SetText(const base::string16& text) OVERRIDE;
+
protected:
// Overridden from views::Label.
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
@@ -190,6 +193,11 @@ void InnerBoundedLabel::OnPaint(gfx::Canvas* canvas) {
}
}
+void InnerBoundedLabel::SetText(const base::string16& text) {
+ views::Label::SetText(text);
+ ClearCaches();
+}
+
int InnerBoundedLabel::GetTextFlags() {
int flags = gfx::Canvas::MULTI_LINE | gfx::Canvas::CHARACTER_BREAK;
@@ -293,6 +301,10 @@ void BoundedLabel::SetLineLimit(int lines) {
line_limit_ = std::max(lines, -1);
}
+void BoundedLabel::SetText(const base::string16& text) {
+ label_->SetText(text);
+}
+
int BoundedLabel::GetLineHeight() const {
return label_->line_height();
}
« no previous file with comments | « ui/message_center/views/bounded_label.h ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698