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

Unified Diff: chrome/browser/printing/print_preview_dialog_controller.cc

Issue 15885004: Adjust PrintPreview height. (Closed) Base URL: http://git.chromium.org/chromium/src.git@constrained-signin
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_dialog_controller.cc
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc
index 17eb41c7c3a2e2a24af8fafafa70024cea1bd183..1af4dc75a7e9ce3f1c17c10ae37bef68a6fb016e 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -126,11 +126,13 @@ void PrintPreviewDialogDelegate::GetWebUIMessageHandlers(
void PrintPreviewDialogDelegate::GetDialogSize(gfx::Size* size) const {
DCHECK(size);
const gfx::Size kMinDialogSize(800, 480);
- const int kBorder = 50;
+ const int kBorder = 25;
+ const int kConstrainedWindowOverlap = 3;
gfx::Rect rect;
initiator_tab_->GetView()->GetContainerBounds(&rect);
- size->set_width(std::max(rect.width(), kMinDialogSize.width()) - kBorder);
- size->set_height(std::max(rect.height(), kMinDialogSize.height()) - kBorder);
+ size->set_width(std::max(rect.width(), kMinDialogSize.width()) - 2 * kBorder);
+ size->set_height(std::max(rect.height(), kMinDialogSize.height()) - kBorder +
+ kConstrainedWindowOverlap);
#if defined(OS_MACOSX)
// Limit the maximum size on MacOS X.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698