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

Unified Diff: ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc

Issue 82483003: Add GetMinimumSize() for Borders, and make LabelButton auto-size to at least as (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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
Index: ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc
===================================================================
--- ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc (revision 236640)
+++ ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc (working copy)
@@ -147,6 +147,7 @@
virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
const gfx::Size& contents_size) const OVERRIDE;
virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const OVERRIDE;
private:
// Note: Animations can continue after then main window frame was destroyed.
@@ -255,7 +256,12 @@
canvas->DrawPath(path, paint);
}
+gfx::Size MaximizeBubbleBorder::GetMinimumSize() const {
msw 2013/11/22 18:00:25 Why is the minimum size needed at all in cases lik
Peter Kasting 2013/11/22 22:07:55 I don't understand the question. Are you saying,
+ return gfx::Size(kLineWidth * 2 + kArrowWidth,
+ std::max(kLineWidth, kArrowHeight) + kLineWidth);
+}
+
// BubbleMouseWatcherHost -----------------------------------------------------
// The mouse watcher host which makes sure that the bubble does not get closed

Powered by Google App Engine
This is Rietveld 408576698