summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/native_dialog_window.cc
diff options
context:
space:
mode:
authorfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-28 01:39:49 +0000
committerfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-28 01:39:49 +0000
commitb037c1e2d832c8ec0e31940c33a637f7117619da (patch)
tree6937474f0b3212ec7d3e8fa23039d1be371fb449 /chrome/browser/chromeos/native_dialog_window.cc
parentd9acdfd0641c5d9c1e37bb2a87068e3af054be47 (diff)
downloadchromium_src-b037c1e2d832c8ec0e31940c33a637f7117619da.zip
chromium_src-b037c1e2d832c8ec0e31940c33a637f7117619da.tar.gz
chromium_src-b037c1e2d832c8ec0e31940c33a637f7117619da.tar.bz2
Fix clipped native dialog on Chrome OS.
BUG=chromium-os:11643 TEST=manually Review URL: http://codereview.chromium.org/6591005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/native_dialog_window.cc')
-rw-r--r--chrome/browser/chromeos/native_dialog_window.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/native_dialog_window.cc b/chrome/browser/chromeos/native_dialog_window.cc
index 160585a..c4f5699 100644
--- a/chrome/browser/chromeos/native_dialog_window.cc
+++ b/chrome/browser/chromeos/native_dialog_window.cc
@@ -228,12 +228,13 @@ void NativeDialogHost::Init() {
g_signal_connect(window()->GetNativeWindow(), "check-resize",
G_CALLBACK(&OnCheckResizeThunk), this);
- // Use gtk's default size if size is not speicified.
+ const int padding = 2 * kDialogPadding;
+ // Use gtk's default size if size is not specified.
if (size_.IsEmpty()) {
// Use given width or height if given.
if (size_.width() || size_.height()) {
- int width = size_.width() == 0 ? -1 : size_.width();
- int height = size_.height() == 0 ? -1 : size_.height();
+ int width = size_.width() == 0 ? -1 : size_.width() + padding;
+ int height = size_.height() == 0 ? -1 : size_.height() + padding;
gtk_widget_set_size_request(contents, width, height);
}
@@ -241,6 +242,9 @@ void NativeDialogHost::Init() {
gtk_widget_size_request(contents, &requsition);
preferred_size_.set_width(requsition.width);
preferred_size_.set_height(requsition.height);
+ } else {
+ preferred_size_.set_width(size_.width() + padding);
+ preferred_size_.set_height(size_.height() + padding);
}
CheckSize();