Issue #305 : Add keyboard shortcut for native preview resolution

This commit is contained in:
jdescottes 2015-09-13 23:07:22 +02:00
parent 1fe327495c
commit 96ab2dd781
6 changed files with 14 additions and 9 deletions

View File

@ -55,3 +55,7 @@ body {
vertical-align: -2px;
margin-left: 0;
}
.tooltip-shortcut {
color:gold;
}

View File

@ -104,18 +104,24 @@
border: 2px solid white;
background: rgba(0, 0, 0, 0.3);
color: #FFF;
color: white;
font-size: 10px;
font-weight: bold;
font-family: Tahoma;
}
.real-size-preview-button:hover,
.real-size-preview-button-enabled {
color: gold;
border-color: gold;
}
.real-size-preview-button-enabled:hover {
color: white;
border-color: white;
}
.preview-contextual-action {
float: left;
}
@ -127,10 +133,8 @@
border : 2px solid white;
background-image: url(../img/popup-preview-arrow-white.png);
background-color : rgba(0,0,0,0.3);
}
.open-popup-preview-button:hover {
border-color: gold;
background-image: url(../img/popup-preview-arrow-gold.png);

View File

@ -251,10 +251,6 @@
padding-bottom: 5px;
}
.tools-tooltip-shortcut {
color:gold;
}
.tools-tooltip-descriptor {
color:#999;
}

View File

@ -77,6 +77,7 @@
var descriptors = [
this.toDescriptor_('0', 'Reset zoom level'),
this.toDescriptor_('+/-', 'Zoom in/Zoom out'),
this.toDescriptor_('ctrl + 1', 'Toggle 1X preview size'),
this.toDescriptor_('ctrl + Z', 'Undo'),
this.toDescriptor_('ctrl + Y', 'Redo'),
this.toDescriptor_('↑', 'Select previous frame'), /* ASCII for up-arrow */

View File

@ -41,7 +41,7 @@
<!-- Drawing tool tooltip container -->
<script type="text/template" id="drawingTool-tooltipContainer-template">
<div class='tools-tooltip-container'>
<div>{{helptext}} <span class='tools-tooltip-shortcut'>{{shortcut}}</span></div>
<div>{{helptext}} <span class='tooltip-shortcut'>{{shortcut}}</span></div>
{{descriptors}}
</div>
</script>

View File

@ -1,7 +1,7 @@
<div id="animated-preview-container" class="preview-container">
<div class="canvas-container-wrapper minimap-container">
<div class="preview-contextual-actions">
<div class="preview-contextual-action real-size-preview-button" title="Display preview in real size (1x)" rel="tooltip" data-placement="bottom">1x</div>
<div class="preview-contextual-action real-size-preview-button" title="Toggle native (1x) resolution <span class='tooltip-shortcut'>(ctrl+1)</span>" rel="tooltip" data-placement="bottom">1x</div>
<div class="preview-contextual-action open-popup-preview-button" title="Open preview in popup" rel="tooltip" data-placement="bottom"></div>
</div>