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

Unified Diff: chrome/browser/ui/panels/panel_manager.h

Issue 8621002: Reduce minimum size of Panels to allow 1-text-line tight autosize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged and updated tests Created 9 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: chrome/browser/ui/panels/panel_manager.h
diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h
index 0e0d3cb1ccb273fe833853e330354d1c557c0032..e672e8e1eb1b04984b9b6e567b8f88fcc96134d2 100644
--- a/chrome/browser/ui/panels/panel_manager.h
+++ b/chrome/browser/ui/panels/panel_manager.h
@@ -118,6 +118,7 @@ class PanelManager : public PanelMouseWatcher::Observer,
private:
friend struct base::DefaultLazyInstanceTraits<PanelManager>;
+ FRIEND_TEST_ALL_PREFIXES(PanelBrowserTest, SizeClamping);
enum TitlebarAction {
NO_ACTION,
@@ -221,12 +222,11 @@ class PanelManager : public PanelMouseWatcher::Observer,
static const int kPanelsHorizontalSpacing = 4;
- // Minimum width and height of a panel.
- // Note: The minimum size of a widget (see widget.cc) is fixed to 100x100.
- // TODO(jianli): Need to fix this to support smaller panel.
- // http://crbug.com/102708
+ // Absolute minimum width and height for panels, including non-client area.
+ // Should only be big enough to accomodate a close button on the reasonably
+ // recognisable titlebar.
static const int kPanelMinWidth = 100;
- static const int kPanelMinHeight = 100;
+ static const int kPanelMinHeight = 20;
DISALLOW_COPY_AND_ASSIGN(PanelManager);
};

Powered by Google App Engine
This is Rietveld 408576698