mirror of https://github.com/docker/docs.git
Fullscreen support
This commit is contained in:
parent
42417c3523
commit
b24e5c1d91
|
@ -8,16 +8,28 @@ var Header = React.createClass({
|
|||
handleMinimize: function () {
|
||||
remote.getCurrentWindow().minimize();
|
||||
},
|
||||
handleMaximize: function () {
|
||||
remote.getCurrentWindow().setFullScreen(!remote.getCurrentWindow().isFullScreen());
|
||||
handleFullscreen: function () {
|
||||
var isFullscreen = remote.getCurrentWindow().isFullScreen();
|
||||
remote.getCurrentWindow().setFullScreen(!isFullscreen);
|
||||
this.forceUpdate();
|
||||
},
|
||||
handleFullscreenHover: function () {
|
||||
this.update();
|
||||
},
|
||||
render: function () {
|
||||
var fullscreenButton;
|
||||
if (remote.getCurrentWindow().isFullScreen()) {
|
||||
fullscreenButton = <div className="button button-fullscreenclose" onClick={this.handleFullscreen}></div>;
|
||||
} else {
|
||||
fullscreenButton = <div className="button button-fullscreen" onClick={this.handleFullscreen}></div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="header">
|
||||
<div className="buttons">
|
||||
<div className="button button-close" onClick={this.handleClose}></div>
|
||||
<div className="button button-minimize" onClick={this.handleMinimize}></div>
|
||||
<div className="button button-maximize" onClick={this.handleMaximize}></div>
|
||||
{fullscreenButton}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Binary file not shown.
After Width: | Height: | Size: 238 B |
Binary file not shown.
Before Width: | Height: | Size: 239 B |
|
@ -23,8 +23,11 @@
|
|||
.button-close {
|
||||
.at2x('close.png', 10px, 10px);
|
||||
}
|
||||
.button-maximize {
|
||||
.at2x('maximize.png', 10px, 10px);
|
||||
.button-fullscreen {
|
||||
.at2x('fullscreen.png', 10px, 10px);
|
||||
}
|
||||
.button-fullscreenclose {
|
||||
.at2x('fullscreenclose.png', 10px, 10px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +47,8 @@
|
|||
box-shadow: 0px 1px 1px 0px rgba(195,198,201,0.50);
|
||||
}
|
||||
|
||||
&:active {
|
||||
&:hover:active {
|
||||
cursor: default;
|
||||
-webkit-filter: brightness(92%);
|
||||
}
|
||||
}
|
||||
|
@ -157,6 +161,7 @@
|
|||
}
|
||||
|
||||
.logs {
|
||||
user-select: text;
|
||||
overflow: auto;
|
||||
font-family: Menlo;
|
||||
font-size: 12px;
|
||||
|
@ -174,6 +179,7 @@ html, body {
|
|||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
user-select: none;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
font-family: 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue