]> khamidou — GitHub mirrors - electron.git/commitdiff
Enable setting only one side of minimum size, fixes #461.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 19 Aug 2014 13:43:18 +0000 (21:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 19 Aug 2014 13:43:18 +0000 (21:43 +0800)
atom/browser/native_window.cc

index d39300121de8aa1691ea51bcae8104abb31e8fbd..0ec5f218c9ce97ebabd86d4918ddc53d7249b660 100644 (file)
@@ -141,8 +141,8 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
   } else if (options.Get(switches::kCenter, &center) && 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));
   }