Small edits and line wrap

This commit is contained in:
Jessica Lord 2015-08-26 16:41:25 -07:00
parent ba9c47eb7e
commit 586b407103
3 changed files with 20 additions and 11 deletions

View file

@ -7,7 +7,7 @@ native applications.
An example of showing a dialog to select multiple files and directories:
```javascript
var win = ...; // window in which to show the dialog
var win = ...; // BrowserWindow in which to show the dialog
var dialog = require('dialog');
console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]}));
```
@ -55,7 +55,7 @@ The `extensions` array should contain extensions without wildcards or dots (e.g.
If a `callback` is passed, the API call will be asynchronous and the result
wil be passed via `callback(filenames)`
**Note:** On Windows and Linux, an open dialog can not be both a file selector
**Note:** On Windows and Linux an open dialog can not be both a file selector
and a directory selector, so if you set `properties` to
`['openFile', 'openDirectory']` on these platforms, a directory selector will be
shown.

View file

@ -1,8 +1,9 @@
# `File` object
The DOM's File interface provides abstraction around native files, in order to
The DOM's File interface provides abstraction around native files in order to
let users work on native files directly with the HTML5 file API. Electron has
added a `path` attribute to the `File` interface which exposes the file's real path on filesystem.
added a `path` attribute to the `File` interface which exposes the file's real
path on filesystem.
Example on getting a real path from a dragged-onto-the-app file:

View file

@ -1,6 +1,6 @@
# Frameless Window
A frameless window is a window that has no [chrome]()—the parts of the window that display close, open, minify buttons and such. These are options on the [`BrowserWindow`](browser-window.md) class.
A frameless window is a window that has no [chrome](https://developer.mozilla.org/en-US/docs/Glossary/Chrome), the parts of the window, like toolbars, that are not a part of the webp page. These are options on the [`BrowserWindow`](browser-window.md) class.
## Create a frameless window
@ -30,11 +30,15 @@ var win = new BrowserWindow({ transparent: true, frame: false });
* Transparent windows are not resizable. Setting `resizable` to `true` may make
a transparent window stop working on some platforms.
* The `blur` filter only applies to the web page, so there is no way to apply
blur effect to the content below the window (i.e. other applications open on the user's system).
* On Windows operation shystems, transparent windows will not work when DWM is disabled.
blur effect to the content below the window (i.e. other applications open on
the user's system).
* On Windows operation shystems, transparent windows will not work when DWM is
disabled.
* On Linux users have to put `--enable-transparent-visuals --disable-gpu` in
the command line to disable GPU and allow ARGB to make transparent window, this is caused by an upstream bug that [alpha channel doesn't work on some NVidia
drivers](https://code.google.com/p/chromium/issues/detail?id=369209) on Linux.
the command line to disable GPU and allow ARGB to make transparent window,
this is caused by an upstream bug that [alpha channel doesn't work on some
NVidia drivers](https://code.google.com/p/chromium/issues/detail?id=369209) on
Linux.
* On Mac the native window shadow will not be shown on a transparent window.
## Draggable region
@ -63,11 +67,15 @@ button {
}
```
If you're setting just a custom titlebar as draggable, you also need to make all buttons in titlebar non-draggable.
If you're setting just a custom titlebar as draggable, you also need to make all
buttons in titlebar non-draggable.
## Text selection
In a frameless window the dragging behaviour may conflict with selecting text. For example, when you drag the titlebar you may accidentally select the text on the titlebar. To prevent this, you need to disable text selection within a draggable area like this:
In a frameless window the dragging behaviour may conflict with selecting text.
For example, when you drag the titlebar you may accidentally select the text on
the titlebar. To prevent this, you need to disable text selection within a
draggable area like this:
```css
.titlebar {