diff --git a/css/app.css b/css/app.css
index e093d234b..01134f272 100644
--- a/css/app.css
+++ b/css/app.css
@@ -70,13 +70,32 @@ body {
background: black;
}
-.full-screen {
+div.full-screen {
position: absolute;
width: 40px;
right: 10px;
top: 10px;
}
+button.full-screen {
+ width: 100%;
+ position: relative;
+}
+
+button.full-screen, button.full-screen.active {
+ width: 40px;
+ height: 40px;
+ background: transparent url(img/fullscreen_request.svg) no-repeat center;
+}
+
+button.full-screen.active {
+ background-image: url(img/fullscreen_exit.svg);
+}
+
+button.full-screen:hover, button.full-screen:focus {
+ background-color: rgba(0, 0, 0, .8);
+}
+
div, textarea, label, input, form, span, ul, li, ol, a, button, h1, h2, h3, h4, h5, p, img {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
diff --git a/dist/img/fullscreen_exit.svg b/dist/img/fullscreen_exit.svg
new file mode 100644
index 000000000..8608ceb52
--- /dev/null
+++ b/dist/img/fullscreen_exit.svg
@@ -0,0 +1,64 @@
+
+
\ No newline at end of file
diff --git a/dist/img/fullscreen_request.svg b/dist/img/fullscreen_request.svg
new file mode 100644
index 000000000..fbdc9874c
--- /dev/null
+++ b/dist/img/fullscreen_request.svg
@@ -0,0 +1,64 @@
+
+
\ No newline at end of file
diff --git a/dist/locales/en.json b/dist/locales/en.json
index 340077464..6eefaada4 100644
--- a/dist/locales/en.json
+++ b/dist/locales/en.json
@@ -431,8 +431,7 @@
}
},
"full_screen": {
- "title": "FS",
- "tooltip": "Toggle Full Screen mode"
+ "tooltip": "Toggle Full Screen"
},
"merge_remote_changes": {
"conflict": {
diff --git a/js/id/ui/full_screen.js b/js/id/ui/full_screen.js
index 90fa798be..e2fec1347 100644
--- a/js/id/ui/full_screen.js
+++ b/js/id/ui/full_screen.js
@@ -1,5 +1,5 @@
iD.ui.FullScreen = function(context) {
- var element = context.container().node();
+ var element = context.container().node(), button;
function getFullScreenFn() {
if (element.requestFullscreen) {
@@ -37,8 +37,10 @@ iD.ui.FullScreen = function(context) {
function fullScreen() {
d3.event.preventDefault();
if (!isFullScreen()) {
+ button.classed('active', true);
getFullScreenFn().apply(element);
} else {
+ button.classed('active', false);
getExitFullScreenFn().apply(document);
}
}
@@ -48,18 +50,13 @@ iD.ui.FullScreen = function(context) {
return;
var tooltip = bootstrap.tooltip()
- .placement('left')
- .html(true)
- .title(iD.ui.tooltipHtml(t('full_screen.tooltip')));
+ .placement('left');
- var button = selection.append('button')
- .attr('class', 'save col12')
+ button = selection.append('button')
+ .attr('class', 'full-screen')
+ .attr('title', t('full_screen.tooltip'))
.attr('tabindex', -1)
.on('click', fullScreen)
.call(tooltip);
-
- button.append('span')
- .attr('class', 'label')
- .text(t('full_screen.title'));
};
};