Index: chrome/browser/ui/panels/docked_panel_strip.cc |
diff --git a/chrome/browser/ui/panels/docked_panel_strip.cc b/chrome/browser/ui/panels/docked_panel_strip.cc |
index 33ae670e71415142a9f974b8fa0fff39fcf808e4..c9122b61f79f7d66457407d67bf70ad7ebacb6c5 100644 |
--- a/chrome/browser/ui/panels/docked_panel_strip.cc |
+++ b/chrome/browser/ui/panels/docked_panel_strip.cc |
@@ -51,8 +51,9 @@ const int kDelayBeforeCollapsingFromTitleOnlyStateMs = 0; |
const int kRefreshLayoutAfterActivePanelChangeDelayMs = 200; // arbitrary |
// The minimum panel width when it is "squeezed" in the docked strip |
-// due to lack of space. |
-const int kMinPanelWidthForDisplay = 26; |
+// due to lack of space. Arbitrary, should still allow the titlebar's buttons |
+// to be somewhat useful. At least Close button should be functional. |
+const int kMinPanelWidthForDisplay = 70; |
jennb
2012/04/28 00:09:49
Why don't we just make this the same as kPanelMinW
Dmitry Titov
2012/04/28 00:57:40
Done.
|
} // namespace |
// static |
@@ -161,6 +162,9 @@ void DockedPanelStrip::InsertNewlyCreatedPanel(Panel* panel) { |
panel->Initialize(gfx::Rect(pt.x(), pt.y(), width, height)); |
+ panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), |
+ gfx::Size(max_panel_width, max_panel_height)); |
+ |
InsertExistingPanelAtDefaultPosition(panel, true /*update_bounds*/); |
} |
@@ -572,7 +576,7 @@ void DockedPanelStrip::ResizePanelWindow( |
// Make sure the new size does not violate panel's size restrictions. |
gfx::Size new_size(preferred_window_size.width(), |
preferred_window_size.height()); |
- panel->ClampSize(&new_size); |
+ new_size = panel->ClampSize(new_size); |
if (new_size == panel->full_size()) |
return; |
@@ -868,13 +872,6 @@ void DockedPanelStrip::CloseAll() { |
} |
void DockedPanelStrip::UpdatePanelOnStripChange(Panel* panel) { |
- // Always update limits, even on existing panels, in case the limits changed |
jennb
2012/04/28 00:09:49
Still want to update the limits here if panel is a
Dmitry Titov
2012/04/28 00:57:40
Done. This leaves the panels that are not auto-res
|
- // while panel was out of the strip. |
- int max_panel_width = GetMaxPanelWidth(); |
- int max_panel_height = GetMaxPanelHeight(); |
- panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), |
- gfx::Size(max_panel_width, max_panel_height)); |
- |
panel->set_attention_mode(Panel::USE_PANEL_ATTENTION); |
panel->SetAppIconVisibility(true); |
panel->SetAlwaysOnTop(true); |