From 7b71ae6824f509bca0535c391b5f43867c0eb1d8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 19 Aug 2014 21:43:18 +0800 Subject: [PATCH] Enable setting only one side of minimum size, fixes #461. --- atom/browser/native_window.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index d39300121de8..0ec5f218c9ce 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -141,8 +141,8 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { } else if (options.Get(switches::kCenter, ¢er) && center) { Center(); } - int min_height = -1, min_width = -1; - if (options.Get(switches::kMinHeight, &min_height) && + int min_height = 0, min_width = 0; + if (options.Get(switches::kMinHeight, &min_height) || options.Get(switches::kMinWidth, &min_width)) { SetMinimumSize(gfx::Size(min_width, min_height)); }