mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
New layout: application actions sticking to the right edge
This commit is contained in:
parent
af95a41e52
commit
13de7cbcfb
@ -12,9 +12,9 @@ body {
|
||||
text-align: center;
|
||||
font-size: 0;
|
||||
position: absolute;
|
||||
left: 104px;
|
||||
left: 100px; /* Reserve room for tools on the left edge of the screen. */
|
||||
top: 10px;
|
||||
right: 0;
|
||||
right: 50px; /* Reserve room for actions on the right edge of the screen. */
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
@ -47,8 +47,7 @@ body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 140px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.sticky-section .wrap {
|
||||
@ -56,6 +55,24 @@ body {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.left-sticky-section.sticky-section {
|
||||
left: 0;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.left-sticky-section .tool-icon {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right-sticky-section.sticky-section {
|
||||
right: 0;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.right-sticky-section .tool-icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Canvases layout
|
||||
@ -133,10 +150,6 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.application-actions {
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
/**
|
||||
* User messages
|
||||
*/
|
||||
|
@ -6,7 +6,6 @@
|
||||
}
|
||||
|
||||
.tool-icon {
|
||||
float: left;
|
||||
cursor : pointer;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
@ -219,5 +218,6 @@
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
28
index.html
28
index.html
@ -17,7 +17,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="menubar" class="sticky-section">
|
||||
<div class="sticky-section left-sticky-section" id="tool-section">
|
||||
<div class="wrap">
|
||||
<ul id="tools-container" class="tools-wrapper"></ul>
|
||||
<div class="palette-wrapper">
|
||||
@ -50,6 +50,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sticky-section right-sticky-section">
|
||||
<div class="wrap">
|
||||
<div class="tool-icon gear-icon" title="Preferences" rel="tooltip" data-placement="left"></div>
|
||||
<a class="tool-icon gallery-icon" title="Visit gallery" href="http://juliandescottes.github.io/piskel-website/" rel="tooltip" data-placement="left" target="_blank"></a>
|
||||
<div class="tool-icon save-icon" title="Save to gallery" onclick="piskel.storeSheet()" rel="tooltip" data-placement="left" ></div>
|
||||
<div class="tool-icon upload-cloud-icon" title="Upload as an animated GIF" onclick="piskel.uploadAsAnimatedGIF()" rel="tooltip" data-placement="left">
|
||||
<span class="label">GIF</span>
|
||||
</div>
|
||||
<div class="tool-icon upload-cloud-icon" title="Upload as a spritesheet PNG" onclick="piskel.uploadAsSpritesheetPNG()" rel="tooltip" data-placement="left">
|
||||
<span class="label">PNG</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column-wrapper">
|
||||
<div class='left-column'>
|
||||
|
||||
@ -81,18 +95,6 @@
|
||||
<input id="preview-fps" class="range-fps" type="range" min="1" max="24" value="12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="application-actions">
|
||||
<a class="tool-icon gallery-icon" title="Visit gallery" href="http://juliandescottes.github.io/piskel-website/" rel="tooltip" data-placement="bottom" target="_blank"></a>
|
||||
<div class="tool-icon save-icon" title="Save to gallery" onclick="piskel.storeSheet()" rel="tooltip" data-placement="bottom" ></div>
|
||||
<div class="tool-icon upload-cloud-icon" title="Upload as an animated GIF" onclick="piskel.uploadAsAnimatedGIF()" rel="tooltip" data-placement="bottom">
|
||||
<span class="label">GIF</span>
|
||||
</div>
|
||||
<div class="tool-icon upload-cloud-icon" title="Upload as a spritesheet PNG" onclick="piskel.uploadAsSpritesheetPNG()" rel="tooltip" data-placement="bottom">
|
||||
<span class="label">PNG</span>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="tool-icon gear-icon" title="Preferences" rel="tooltip" data-placement="bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
this.selectTool_(this.toolInstances[tool]);
|
||||
|
||||
// Show tool as selected:
|
||||
$('#menubar .tool-icon.selected').removeClass('selected');
|
||||
$('#tool-section .tool-icon.selected').removeClass('selected');
|
||||
clickedTool.addClass('selected');
|
||||
}
|
||||
}
|
||||
@ -105,7 +105,7 @@
|
||||
// Set SimplePen as default selected tool:
|
||||
this.selectTool_(this.toolInstances.simplePen);
|
||||
// Activate listener on tool panel:
|
||||
$("#menubar").click($.proxy(this.onToolIconClicked_, this));
|
||||
$("#tool-section").click($.proxy(this.onToolIconClicked_, this));
|
||||
|
||||
// Show/hide the grid on drawing canvas:
|
||||
$.publish(Events.GRID_DISPLAY_STATE_CHANGED, [this.isShowGridChecked_()]);
|
||||
|
Loading…
Reference in New Issue
Block a user