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

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 255063004: Ignoring minimum size requirements for maximized windows, full screen windows and too small screens (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The panel layout manager was also required Created 6 years, 8 months 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
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index 8954e57f39e4dbb41c8799e48962fe1a5320cf57..5a8d2e935e3a31faf2d2e17c87893d454bdfe056 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -27,6 +27,7 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tracker.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
@@ -433,6 +434,12 @@ void PanelLayoutManager::SetChildBounds(aura::Window* child,
panel_windows_.insert(new_position, dragged_panel_info);
}
}
+ // Respect the minimum size of the window.
+ if (child->delegate()) {
+ const gfx::Size& min_size = child->delegate()->GetMinimumSize();
+ bounds.set_width(std::max(min_size.width(), bounds.width()));
+ bounds.set_height(std::max(min_size.height(), bounds.height()));
+ }
SetChildBoundsDirect(child, bounds);
Relayout();
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698