Browse Source

zoomToContentSize -> zoomToPageWidth

Kevin Sawicki 8 years ago
parent
commit
7916981da2

+ 2 - 2
atom/browser/native_window_mac.h

@@ -117,7 +117,7 @@ class NativeWindowMac : public NativeWindow,
   };
   TitleBarStyle title_bar_style() const { return title_bar_style_; }
 
-  bool zoom_to_content_size() const { return zoom_to_content_size_; }
+  bool zoom_to_page_width() const { return zoom_to_page_width_; }
 
  protected:
   // Return a vector of non-draggable regions that fill a window of size
@@ -157,7 +157,7 @@ class NativeWindowMac : public NativeWindow,
 
   bool is_kiosk_;
 
-  bool zoom_to_content_size_;
+  bool zoom_to_page_width_;
 
   NSInteger attention_request_id_;  // identifier from requestUserAttention
 

+ 3 - 3
atom/browser/native_window_mac.mm

@@ -106,7 +106,7 @@ bool ScopedDisableResize::disable_resize_ = false;
 // menu) to determine the "standard size" of the window.
 - (NSRect)windowWillUseStandardFrame:(NSWindow*)window
                         defaultFrame:(NSRect)frame {
-  if (!shell_->zoom_to_content_size())
+  if (!shell_->zoom_to_page_width())
     return frame;
 
   // If the shift key is down, maximize.
@@ -630,7 +630,7 @@ NativeWindowMac::NativeWindowMac(
     NativeWindow* parent)
     : NativeWindow(web_contents, options, parent),
       is_kiosk_(false),
-      zoom_to_content_size_(false),
+      zoom_to_page_width_(false),
       attention_request_id_(0),
       title_bar_style_(NORMAL) {
   int width = 800, height = 600;
@@ -753,7 +753,7 @@ NativeWindowMac::NativeWindowMac(
   if (!has_frame() || !use_content_size)
     SetSize(gfx::Size(width, height));
 
-  options.Get(options::kZoomToContentSize, &zoom_to_content_size_);
+  options.Get(options::kZoomToPageWidth, &zoom_to_page_width_);
 
   // Enable the NSView to accept first mouse event.
   bool acceptsFirstMouse = false;

+ 2 - 2
atom/common/options_switches.cc

@@ -45,8 +45,8 @@ const char kAcceptFirstMouse[] = "acceptFirstMouse";
 // Whether window size should include window frame.
 const char kUseContentSize[] = "useContentSize";
 
-// Whether window zoom should be to content size.
-const char kZoomToContentSize[] = "zoomToContentSize";
+// Whether window zoom should be to page width.
+const char kZoomToPageWidth[] = "zoomToPageWidth";
 
 // The requested title bar style for the window
 const char kTitleBarStyle[] = "titleBarStyle";

+ 1 - 1
atom/common/options_switches.h

@@ -34,7 +34,7 @@ extern const char kKiosk[];
 extern const char kAlwaysOnTop[];
 extern const char kAcceptFirstMouse[];
 extern const char kUseContentSize[];
-extern const char kZoomToContentSize[];
+extern const char kZoomToPageWidth[];
 extern const char kTitleBarStyle[];
 extern const char kAutoHideMenuBar[];
 extern const char kEnableLargerThanScreen[];

+ 1 - 1
docs/api/browser-window.md

@@ -205,7 +205,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
   * `vibrancy` String - Add a type of vibrancy effect to the window, only on
     macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`,
     `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`.
-  * `zoomToContentSize` Boolean - The zoom behavior on macOS, accessible by
+  * `zoomToPageWidth` Boolean - The zoom behavior on macOS, accessible by
     option-clicking the green stoplight button on the toolbar or running the
     Window > Zoom menu item. If `true`, the window will grow to the width of the
     web page, `false` will cause it to zoom to the width of the screen. This