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

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

Issue 1035553002: message center: Make BoundedLabel override OnPaint instead of Paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: boundedlabel: earlyout Created 5 years, 9 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') | no next file » | 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 ca9f0f954124f917db750820afb83a621aadab70..e9b0f65efd4e6ed85151e65b8b7ee0935c332d57 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -45,11 +45,11 @@ class InnerBoundedLabel : public views::Label {
// Overridden from views::Label.
void SetText(const base::string16& text) override;
+ void OnPaint(gfx::Canvas* canvas) override;
protected:
// Overridden from views::Label.
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
- void OnPaint(gfx::Canvas* canvas) override;
private:
int GetTextFlags();
@@ -319,9 +319,8 @@ int BoundedLabel::GetHeightForWidth(int width) const {
label_->GetSizeForWidthAndLines(width, line_limit_).height() : 0;
}
-void BoundedLabel::Paint(gfx::Canvas* canvas, const views::CullSet& cull_set) {
- if (visible())
- label_->Paint(canvas, cull_set);
+void BoundedLabel::OnPaint(gfx::Canvas* canvas) {
+ label_->OnPaint(canvas);
}
bool BoundedLabel::CanProcessEventsWithinSubtree() const {
« no previous file with comments | « ui/message_center/views/bounded_label.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698