summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/status_bubble_views.h
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 23:32:21 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 23:32:21 +0000
commit448219347191361795210e39ccdca14cfd76a62c (patch)
tree737b978a72876dfad9c958e0c879632a95b4e308 /chrome/browser/views/status_bubble_views.h
parent5bc87e02c16ccf68c69bff890af32748dba95142 (diff)
downloadchromium_src-448219347191361795210e39ccdca14cfd76a62c.zip
chromium_src-448219347191361795210e39ccdca14cfd76a62c.tar.gz
chromium_src-448219347191361795210e39ccdca14cfd76a62c.tar.bz2
Changed the status bar size to adapt to the size of the font,
instead of being a const. BUG= http://crbug.com/1275 TEST=Set Windows XP font size to large or extra-large. Open Chrome. Hover over a link to bring up the status bubble. Text should sit comfortably in bubble, without being squeezed. Review URL: http://codereview.chromium.org/113490 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/status_bubble_views.h')
-rw-r--r--chrome/browser/views/status_bubble_views.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/views/status_bubble_views.h b/chrome/browser/views/status_bubble_views.h
index 0dc90b0..8b8fd9e 100644
--- a/chrome/browser/views/status_bubble_views.h
+++ b/chrome/browser/views/status_bubble_views.h
@@ -23,16 +23,23 @@ class StatusBubbleViews : public StatusBubble {
// How wide the bubble's shadow is.
static const int kShadowThickness;
+ // The combined vertical padding above and below the text.
+ static const int kTotalVerticalPadding = 7;
+
explicit StatusBubbleViews(views::Widget* frame);
~StatusBubbleViews();
- // Set the bounds of the bubble relative to the browser window.
- void SetBounds(int x, int y, int w, int h);
-
// Reposition the bubble - as we are using a WS_POPUP for the bubble,
// we have to manually position it when the browser window moves.
void Reposition();
+ // The bubble only has a preferred height: the sum of the height of
+ // the font and kTotalVerticalPadding.
+ gfx::Size GetPreferredSize();
+
+ // Set the bounds of the bubble relative to the browser window.
+ void SetBounds(int x, int y, int w, int h);
+
// Overridden from StatusBubble:
virtual void SetStatus(const std::wstring& status);
virtual void SetURL(const GURL& url, const std::wstring& languages);