Cleaning up settings and dialogs CSS

This commit is contained in:
jdescottes 2015-06-07 12:40:40 +02:00
parent e773f9ae6d
commit 12cfe16cb4
13 changed files with 50 additions and 46 deletions

View File

@ -2,6 +2,19 @@
/* Import dialog */ /* Import dialog */
/************************************************************************************************/ /************************************************************************************************/
#dialog-container.import-image {
width: 550px;
height: 360px;
top : 50%;
left : 50%;
position : absolute;
margin-left: -250px;
}
.show #dialog-container.import-image {
margin-top: -150px;
}
.import-subsection { .import-subsection {
margin-left: 25px; margin-left: 25px;
} }
@ -57,14 +70,17 @@
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
word-break : break-all; width: 200px;
vertical-align: middle; vertical-align: middle;
word-break : break-all;
white-space: nowrap;
text-overflow: ellipsis;
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
text-shadow: none; text-shadow: none;
width: 200px; color: gold;
white-space: nowrap;
text-overflow: ellipsis;
} }
[name=smooth-resize-checkbox] { [name=smooth-resize-checkbox] {
@ -78,7 +94,7 @@
.import-button { .import-button {
font-size: 1em; font-size: 1em;
height: auto; height: 28px;
padding: 5px 10px; padding: 0px 10px;
margin-top: 15px; margin-top: 15px;
} }

View File

@ -65,19 +65,6 @@
margin-top: -250px; margin-top: -250px;
} }
#dialog-container.import-image {
width: 550px;
height: 350px;
top : 50%;
left : 50%;
position : absolute;
margin-left: -250px;
}
.show #dialog-container.import-image {
margin-top: -150px;
}
.dialog-wrapper { .dialog-wrapper {
height: 100%; height: 100%;
position : relative; position : relative;

View File

@ -10,6 +10,8 @@
border-radius : 2px; border-radius : 2px;
padding : 3px 10px; padding : 3px 10px;
color : white; color : white;
height: 23px;
} }
.textfield[disabled=disabled] { .textfield[disabled=disabled] {

View File

@ -3,7 +3,7 @@ html, body {
margin : 0; margin : 0;
overflow: hidden; overflow: hidden;
cursor : default; cursor : default;
font-family: arial; font-family: Arial;
font-size: 11px; font-size: 11px;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none; -webkit-user-select: none;
@ -19,6 +19,11 @@ ul, li {
list-style-type: none; list-style-type: none;
} }
/** Firefox overrides this with -moz-use-system-font */
input,
input[type="submit"] {
font-family: Arial;
}
/* Force apparition of scrollbars on leopard */ /* Force apparition of scrollbars on leopard */
::-webkit-scrollbar { ::-webkit-scrollbar {

View File

@ -1,4 +1,3 @@
.tiled-preview-checkbox { /*******************************/
vertical-align: -2px; /* Application Setting panel */
margin-left: 0; /*******************************/
}

View File

@ -5,17 +5,6 @@
width: 25%; width: 25%;
} }
.resize-content-checkbox {
margin-left: 0;
}
.resize-ratio-checkbox,
.resize-smooth-checkbox {
vertical-align: -2px;
margin-left: 0;
}
/*****************/ /*****************/
/* ANCHOR WIDGET */ /* ANCHOR WIDGET */
/*****************/ /*****************/

View File

@ -50,3 +50,8 @@ body {
.uppercase { .uppercase {
text-transform: uppercase; text-transform: uppercase;
} }
.checkbox-fix {
vertical-align: -2px;
margin-left: 0;
}

View File

@ -136,6 +136,7 @@
var fileName = this.extractFileNameFromPath_(this.file_.name); var fileName = this.extractFileNameFromPath_(this.file_.name);
this.fileNameContainer.html(fileName); this.fileNameContainer.html(fileName);
this.fileNameContainer.attr('title', fileName);
this.resizeWidth.val(w); this.resizeWidth.val(w);
this.resizeHeight.val(h); this.resizeHeight.val(h);

View File

@ -10,10 +10,10 @@
pskl.utils.inherit(ns.PngExportController, pskl.controller.settings.AbstractSettingController); pskl.utils.inherit(ns.PngExportController, pskl.controller.settings.AbstractSettingController);
ns.PngExportController.prototype.init = function () { ns.PngExportController.prototype.init = function () {
this.pngFilePrefixInput = document.getElementById('zip-prefix-name'); this.pngFilePrefixInput = document.querySelector('.zip-prefix-name');
this.pngFilePrefixInput.value = 'sprite_'; this.pngFilePrefixInput.value = 'sprite_';
this.splitByLayersCheckbox = document.getElementById('zip-split-by-layers'); this.splitByLayersCheckbox = document.querySelector('.zip-split-layers-checkbox');
var downloadButton = document.querySelector('.png-download-button'); var downloadButton = document.querySelector('.png-download-button');
this.addEventListener(downloadButton, 'click', this.onPngDownloadButtonClick_); this.addEventListener(downloadButton, 'click', this.onPngDownloadButtonClick_);

View File

@ -25,7 +25,7 @@
</div> </div>
<div class="import-section import-subsection"> <div class="import-section import-subsection">
<span class="import-section-title">Smooth resize</span> <span class="import-section-title">Smooth resize</span>
<input type="checkbox" checked="checked" name="smooth-resize-checkbox" value="1"/> <input type="checkbox" class="checkbox-fix" checked="checked" name="smooth-resize-checkbox" value="1"/>
</div> </div>
<div class="import-section"> <div class="import-section">
<label class="dialog-section-radio-label"> <label class="dialog-section-radio-label">

View File

@ -39,7 +39,7 @@
<div class="settings-item"> <div class="settings-item">
<label> <label>
<input type="checkbox" value="1" class="tiled-preview-checkbox" name="tiled-preview-checkbox"/> <input type="checkbox" value="1" class="tiled-preview-checkbox checkbox-fix" name="tiled-preview-checkbox"/>
Repeated preview Repeated preview
</label> </label>
</div> </div>

View File

@ -13,12 +13,12 @@
<span class="settings-description">ZIP with one PNG file per frame.</span> <span class="settings-description">ZIP with one PNG file per frame.</span>
<span class="settings-description" style="display:block">File names will start with the prefix below.</span> <span class="settings-description" style="display:block">File names will start with the prefix below.</span>
<div class="settings-item"> <div class="settings-item">
<label for="zip-prefix-name">Prefix:</label> <label>Prefix</label>
<input id="zip-prefix-name" type="text" class="textfield" placeholder="PNG file prefix ..."> <input class="zip-prefix-name textfield" type="text" placeholder="PNG file prefix ...">
</div> </div>
<div class="settings-item"> <div class="settings-item">
<label> <label>
<input id="zip-split-by-layers" type="checkbox" /> <input class="zip-split-layers-checkbox checkbox-fix" type="checkbox" />
Split by layers Split by layers
</label> </label>
</div> </div>

View File

@ -17,13 +17,13 @@
</div> </div>
<div class="resize-section"> <div class="resize-section">
<label> <label>
<input type="checkbox" class="resize-ratio-checkbox" value="true" checked="true"/> <input type="checkbox" class="resize-ratio-checkbox checkbox-fix" value="true" checked="true"/>
<span>Maintain aspect ratio</span> <span>Maintain aspect ratio</span>
</label> </label>
</div> </div>
<div class="resize-section"> <div class="resize-section">
<label> <label>
<input type="checkbox" class="resize-content-checkbox" value="true"/> <input type="checkbox" class="resize-content-checkbox checkbox-fix" value="true"/>
<span>Resize canvas content</span> <span>Resize canvas content</span>
</label> </label>
</div> </div>