From 06a39a2e429718dad08c326088f147cc37fc1315 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 15 Jan 2018 03:59:53 +0300 Subject: [PATCH] lots of minor tweaks... Signed-off-by: Alex A. Naanou --- ui (gen4)/Makefile | 10 +++++- ui (gen4)/css/fonts.css | 38 ++++++++++++++++++++ ui (gen4)/css/layout.less | 24 +++++++++++++ ui (gen4)/features/app.js | 9 +++-- ui (gen4)/features/ui-widgets.js | 10 ++++-- ui (gen4)/package-lock.json | 62 ++++++++++++++++++++++++++++++++ ui (gen4)/package.json | 2 ++ 7 files changed, 148 insertions(+), 7 deletions(-) diff --git a/ui (gen4)/Makefile b/ui (gen4)/Makefile index 8a7c157a..af50f2e7 100755 --- a/ui (gen4)/Makefile +++ b/ui (gen4)/Makefile @@ -66,7 +66,7 @@ # - might be a good idea to do a no-bin target -- exclude native... # - add a cli-only build # - installers: -# - msi +# - msi (wix) # - deb # - ... # - cross-compiling support... @@ -74,6 +74,14 @@ # - nwjs??? # # +# Links: +# WiX example... +# https://helgeklein.com/blog/2014/09/real-world-example-wix-msi-application-installer/ +# npm modules to abstract WiX... +# https://www.npmjs.com/package/electron-wix-msi +# https://www.npmjs.com/package/electron-builder +# +# # #********************************************************************** # variables... diff --git a/ui (gen4)/css/fonts.css b/ui (gen4)/css/fonts.css index ff1bd9f5..4ab44405 100755 --- a/ui (gen4)/css/fonts.css +++ b/ui (gen4)/css/fonts.css @@ -231,6 +231,44 @@ } */ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(https://example.com/MaterialIcons-Regular.eot); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url(fonts/MaterialIcons/MaterialIcons-Regular.woff2) format('woff2'), + url(fonts/MaterialIcons/MaterialIcons-Regular.woff) format('woff'), + url(fonts/MaterialIcons/MaterialIcons-Regular.ttf) format('truetype'); +} +.material-icons { + font-family: 'Material Icons'; + /* + font-weight: normal; + font-style: normal; + font-size: 24px; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + */ + + vertical-align: middle; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; /* Safari and Chrome */ + font-feature-settings: 'liga'; /* IE */ +} +.material-icons.md-16 { font-size: 16px; } +.material-icons.md-18 { font-size: 18px; } +.material-icons.md-24 { font-size: 24px; } +.material-icons.md-36 { font-size: 36px; } +.material-icons.md-48 { font-size: 48px; } /*********************************************************************/ diff --git a/ui (gen4)/css/layout.less b/ui (gen4)/css/layout.less index 702f29a8..f9de5de2 100755 --- a/ui (gen4)/css/layout.less +++ b/ui (gen4)/css/layout.less @@ -346,6 +346,7 @@ button:hover { } +/* Custom buttons... */ .buttons .button.ui-settings { opacity: 0.5; } @@ -353,6 +354,29 @@ button:hover { opacity: 1; } +.buttons .button.touch-controls:after { + display: inline-block; + content: ""; + + width: 0.7em; + height: 0.6em; + border: solid 0.05em silver; + border-left: solid 0.2em silver; + border-right: solid 0.2em silver; + + border-radius: 1px; + + opacity: 0.5; +} +.buttons .button.touch-controls:hover:after { + border: solid 0.05em white; + border-left: solid 0.2em white; + border-right: solid 0.2em white; + + opacity: 1; +} + + /* main buttons... */ .main-buttons.buttons { diff --git a/ui (gen4)/features/app.js b/ui (gen4)/features/app.js index c149ca17..161414d6 100755 --- a/ui (gen4)/features/app.js +++ b/ui (gen4)/features/app.js @@ -552,12 +552,15 @@ module.AppControl = core.ImageGridFeatures.Feature('ui-app-control', [ var AppButtonsActions = actions.Actions({ config: { 'app-buttons': { + //'': ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], // XXX not sure about this... - '⛭': ['ui-settings allways-shown', - 'browseActions: "Interface/" -- Interface settings...'], + '⛭': ['ui-settings', [ + 'browseActions: "Interface/" -- Interface settings...', + 'toggleSideButtons -- Toggle touch controls', + ]], '_': ['minimize', 'minimize -- Minimize'], - '↙': ['fullscreen allways-shown', + '↙': ['fullscreen', 'toggleFullScreen -- Toggle fullscreen'], '×': ['close', 'close -- Quit'], diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index b4293564..fa96406c 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -89,6 +89,7 @@ function(context, cls, data){ } else { var e = data[k].slice() var primary = e.pop() + primary = primary instanceof Array ? primary.slice() : primary var secondary = (primary instanceof Array && primary.length > 1) ? primary.pop() : null @@ -2027,9 +2028,12 @@ var ButtonsActions = actions.Actions({ }, 'app-buttons': { - //'
': - // ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], - '⛭': ['ui-settings', 'browseActions: "Interface/" -- Interface settings...'], + //'': ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], + //'⛭': ['ui-settings', 'browseActions: "Interface/" -- Interface settings...'], + '⛭': ['ui-settings', [ + 'browseActions: "Interface/" -- Interface settings...', + 'toggleSideButtons -- Toggle touch controls', + ]], }, 'side-buttons-state': 'off', diff --git a/ui (gen4)/package-lock.json b/ui (gen4)/package-lock.json index ff57e591..f2325548 100755 --- a/ui (gen4)/package-lock.json +++ b/ui (gen4)/package-lock.json @@ -184,6 +184,15 @@ } } }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "deep-equal": { "version": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", @@ -207,6 +216,19 @@ "jsbn": "0.1.1" } }, + "electron-wix-msi": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/electron-wix-msi/-/electron-wix-msi-1.2.3.tgz", + "integrity": "sha512-5cWuQbI+p6KVGr8ZafIOFIwqhiIzynpPzVwTjJ5J5QTkgSvlqPP+PIJtZ5dJiLpNtU3eFgsHs+qpmSB4fGx8FA==", + "dev": true, + "requires": { + "debug": "3.1.0", + "fs-extra": "4.0.3", + "klaw": "2.1.1", + "lodash": "4.17.4", + "uuid": "3.1.0" + } + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -1056,6 +1078,23 @@ } } }, + "klaw": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.1.1.tgz", + "integrity": "sha1-QrdolHARacyRD9DRnOZ3tfs3ivE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, "less": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", @@ -1269,6 +1308,12 @@ } } }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", @@ -1313,6 +1358,17 @@ "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" } }, + "moment": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", + "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "nan": { "version": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz", "integrity": "sha1-1bAWkSUzJql6K77p5hxV2NYDUeI=" @@ -1611,6 +1667,12 @@ "prepend-http": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" } }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", diff --git a/ui (gen4)/package.json b/ui (gen4)/package.json index 8e3886d3..f256b9a0 100755 --- a/ui (gen4)/package.json +++ b/ui (gen4)/package.json @@ -28,6 +28,7 @@ "ig-actions": "^3.12.0", "ig-features": "^3.3.2", "ig-object": "^1.0.2", + "moment": "^2.20.1", "openseadragon": "^2.3.1", "requirejs": "^2.3.5", "requirejs-plugins": "^1.0.2", @@ -43,6 +44,7 @@ "react-dom": "^15.6.2" }, "devDependencies": { + "electron-wix-msi": "^1.2.3", "less": "*" }, "bin": {