From 3b1f4ffd759613966f97624b885b08b31f6d38fc Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Mon, 29 Dec 2014 13:45:18 +0100 Subject: [PATCH] Small changes. --- src/_h5ai/client/css/inc/general.less | 4 +++- src/_h5ai/client/css/inc/view-details.less | 1 + src/_h5ai/client/css/inc/view-grid.less | 1 + src/_h5ai/client/css/inc/view-icons.less | 2 ++ src/_h5ai/client/css/inc/view.less | 8 ++++++-- src/_h5ai/client/images/themes/default/x.svg | 3 +++ .../client/images/ui/{tree.svg => tree-indicator.svg} | 0 .../images/ui/{view-tree.svg => tree-toggle.svg} | 0 src/_h5ai/client/js/inc/ext/tree.js | 4 ++-- src/_h5ai/client/js/inc/view/viewmode.js | 10 ++++++---- src/_h5ai/index.html.jade | 2 +- 11 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 src/_h5ai/client/images/themes/default/x.svg rename src/_h5ai/client/images/ui/{tree.svg => tree-indicator.svg} (100%) rename src/_h5ai/client/images/ui/{view-tree.svg => tree-toggle.svg} (100%) diff --git a/src/_h5ai/client/css/inc/general.less b/src/_h5ai/client/css/inc/general.less index 7ffb7a94..6723e1ef 100644 --- a/src/_h5ai/client/css/inc/general.less +++ b/src/_h5ai/client/css/inc/general.less @@ -56,7 +56,6 @@ @col-sb-thumb-active: rgba(0,0,0,0.25); @col-range-back: rgb(224,224,224); -// @col-range-thumb: rgb(190,190,190); @col-range-thumb: #555; @border-widget: 1px solid @col-border; @@ -67,6 +66,9 @@ @font-size: 13px; @font-family-mono: monospace; +@max-icon-size: 32px; +// @max-icon-size: 24px; + ::-moz-selection { background: @col-blue-400; color: @col-text-primary-white; text-shadow: none; } ::selection { background: @col-blue-400; color: @col-text-primary-white; text-shadow: none; } diff --git a/src/_h5ai/client/css/inc/view-details.less b/src/_h5ai/client/css/inc/view-details.less index d1d4da9e..92780747 100644 --- a/src/_h5ai/client/css/inc/view-details.less +++ b/src/_h5ai/client/css/inc/view-details.less @@ -9,6 +9,7 @@ .square { width: @size; + height: @size; img { width: @size; diff --git a/src/_h5ai/client/css/inc/view-grid.less b/src/_h5ai/client/css/inc/view-grid.less index 5a1033bc..657281be 100644 --- a/src/_h5ai/client/css/inc/view-grid.less +++ b/src/_h5ai/client/css/inc/view-grid.less @@ -7,6 +7,7 @@ .square { width: @size; + height: @size; img { width: @size; diff --git a/src/_h5ai/client/css/inc/view-icons.less b/src/_h5ai/client/css/inc/view-icons.less index b2deee67..0d546120 100644 --- a/src/_h5ai/client/css/inc/view-icons.less +++ b/src/_h5ai/client/css/inc/view-icons.less @@ -6,6 +6,8 @@ } .landscape { + width: @size * 4/3; + height: @size; img { width: @size; diff --git a/src/_h5ai/client/css/inc/view.less b/src/_h5ai/client/css/inc/view.less index c493d955..ee173114 100644 --- a/src/_h5ai/client/css/inc/view.less +++ b/src/_h5ai/client/css/inc/view.less @@ -73,12 +73,16 @@ text-align: center; img { - vertical-align: top; - max-width: 32px; + max-width: @max-icon-size; + max-height: @max-icon-size; + position: relative; + top: 50%; + transform: translateY(-50%); } .thumb { max-width: none; + max-height: none; } } diff --git a/src/_h5ai/client/images/themes/default/x.svg b/src/_h5ai/client/images/themes/default/x.svg new file mode 100644 index 00000000..86bb36a7 --- /dev/null +++ b/src/_h5ai/client/images/themes/default/x.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/_h5ai/client/images/ui/tree.svg b/src/_h5ai/client/images/ui/tree-indicator.svg similarity index 100% rename from src/_h5ai/client/images/ui/tree.svg rename to src/_h5ai/client/images/ui/tree-indicator.svg diff --git a/src/_h5ai/client/images/ui/view-tree.svg b/src/_h5ai/client/images/ui/tree-toggle.svg similarity index 100% rename from src/_h5ai/client/images/ui/view-tree.svg rename to src/_h5ai/client/images/ui/tree-toggle.svg diff --git a/src/_h5ai/client/js/inc/ext/tree.js b/src/_h5ai/client/js/inc/ext/tree.js index f9127b32..af9a6286 100644 --- a/src/_h5ai/client/js/inc/ext/tree.js +++ b/src/_h5ai/client/js/inc/ext/tree.js @@ -7,7 +7,7 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/s var template = '
' + '' + - '' + + '' + '' + '' + '' + @@ -18,7 +18,7 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/s '
' + '

Tree

' + '
' + - 'view-tree' + + 'view-tree' + '
' + '
'; var storekey = 'ext/tree'; diff --git a/src/_h5ai/client/js/inc/view/viewmode.js b/src/_h5ai/client/js/inc/view/viewmode.js index dddf701d..c993c708 100644 --- a/src/_h5ai/client/js/inc/view/viewmode.js +++ b/src/_h5ai/client/js/inc/view/viewmode.js @@ -47,21 +47,23 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c var dsize = cropSize(size, 10, 80); var gsize = cropSize(size, 40, 150); var isize = cropSize(size, 80); + var ilsize = Math.round(isize*4/3); var rules = [ '#view.view-details .item .label { line-height: ' + (dsize+14) + 'px !important; }', '#view.view-details .item .date { line-height: ' + (dsize+14) + 'px !important; }', '#view.view-details .item .size { line-height: ' + (dsize+14) + 'px !important; }', - '#view.view-details .square { width: ' + dsize + 'px !important; }', + '#view.view-details .square { width: ' + dsize + 'px !important; height: ' + dsize + 'px !important; }', '#view.view-details .square img { width: ' + dsize + 'px !important; height: ' + dsize + 'px !important; }', '#view.view-details .label { margin: 0 246px 0 ' + (dsize+32) + 'px !important; }', '#view.view-grid .item .label { line-height: ' + gsize + 'px !important; }', - '#view.view-grid .square { width: ' + gsize + 'px !important; }', + '#view.view-grid .square { width: ' + gsize + 'px !important; height: ' + gsize + 'px !important; }', '#view.view-grid .square img { width: ' + gsize + 'px !important; height: ' + gsize + 'px !important; }', - '#view.view-icons .item { width: ' + Math.round(isize*4/3) + 'px !important; }', + '#view.view-icons .item { width: ' + ilsize + 'px !important; }', + '#view.view-icons .landscape { width: ' + ilsize + 'px !important; height: ' + isize + 'px !important; }', '#view.view-icons .landscape img { width: ' + isize + 'px !important; height: ' + isize + 'px !important; }', - '#view.view-icons .landscape .thumb { width: ' + Math.round(isize*4/3) + 'px !important; }' + '#view.view-icons .landscape .thumb { width: ' + ilsize + 'px !important; }' ]; applyCss(rules); } diff --git a/src/_h5ai/index.html.jade b/src/_h5ai/index.html.jade index a1a74964..fc7e5285 100644 --- a/src/_h5ai/index.html.jade +++ b/src/_h5ai/index.html.jade @@ -24,7 +24,7 @@ body#h5ai-info form( action="https://www.paypal.com/cgi-bin/webscr", method="post", target="_top" ) input( type="hidden", name="cmd", value="_s-xclick" ) input( type="hidden", name="hosted_button_id", value="8WSPKWT7YBTSQ" ) - input( type="image", src="client/images/paypal.svg", width="100px", border="0", name="submit", alt="PayPal - The safer, easier way to pay online!" ) + input( type="image", src="client/images/ui/paypal.svg", width="100px", border="0", name="submit", alt="PayPal - The safer, easier way to pay online!" ) div#bottombar span.noJsMsg