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

Side by Side Diff: ui/views/bubble/bubble_border.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Returns the corner radius of the current image set. 156 // Returns the corner radius of the current image set.
157 int GetBorderCornerRadius() const; 157 int GetBorderCornerRadius() const;
158 158
159 // Gets the arrow offset to use. 159 // Gets the arrow offset to use.
160 int GetArrowOffset(const gfx::Size& border_size) const; 160 int GetArrowOffset(const gfx::Size& border_size) const;
161 161
162 // Overridden from Border: 162 // Overridden from Border:
163 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; 163 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
164 virtual gfx::Insets GetInsets() const OVERRIDE; 164 virtual gfx::Insets GetInsets() const OVERRIDE;
165 virtual gfx::Size GetMinimumSize() const OVERRIDE;
165 166
166 private: 167 private:
168 gfx::Size GetSizeForContentsSize(const gfx::Size& contents_size) const;
167 gfx::ImageSkia* GetArrowImage() const; 169 gfx::ImageSkia* GetArrowImage() const;
168 gfx::Rect GetArrowRect(const gfx::Rect& bounds) const; 170 gfx::Rect GetArrowRect(const gfx::Rect& bounds) const;
169 void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const; 171 void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const;
170 172
171 Arrow arrow_; 173 Arrow arrow_;
172 int arrow_offset_; 174 int arrow_offset_;
173 ArrowPaintType arrow_paint_type_; 175 ArrowPaintType arrow_paint_type_;
174 BubbleAlignment alignment_; 176 BubbleAlignment alignment_;
175 Shadow shadow_; 177 Shadow shadow_;
176 internal::BorderImages* images_; 178 internal::BorderImages* images_;
(...skipping 13 matching lines...) Expand all
190 192
191 private: 193 private:
192 BubbleBorder* border_; 194 BubbleBorder* border_;
193 195
194 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); 196 DISALLOW_COPY_AND_ASSIGN(BubbleBackground);
195 }; 197 };
196 198
197 } // namespace views 199 } // namespace views
198 200
199 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 201 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698