From 66aea366859303edc6e220f2ec1ec6fc1f8120c0 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 18 Jan 2018 07:21:19 +0300 Subject: [PATCH] fixed settings icon for mac (still need to change the icon)... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/app.js | 28 +++++++++++++--------------- ui (gen4)/features/ui-widgets.js | 14 ++++++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ui (gen4)/features/app.js b/ui (gen4)/features/app.js index ac7973e3..80675235 100755 --- a/ui (gen4)/features/app.js +++ b/ui (gen4)/features/app.js @@ -23,6 +23,7 @@ var toggler = require('lib/toggler') var core = require('features/core') var base = require('features/base') +var widgets = require('features/ui-widgets') @@ -549,23 +550,20 @@ module.AppControl = core.ImageGridFeatures.Feature('ui-app-control', [ //--------------------------------------------------------------------- // Fullscreen app control buttons... + var AppButtonsActions = actions.Actions({ config: { - 'app-buttons': { - //'': ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], - // XXX not sure about this... - //'⛭': ['ui-settings', [ - 'settings': ['ui-settings', [ - 'browseActions: "Interface/" -- Interface settings...', - 'toggleSideButtons -- Toggle touch controls', - ]], - '_': ['minimize', - 'minimize -- Minimize'], - '↙': ['fullscreen', - 'toggleFullScreen -- Toggle fullscreen'], - '×': ['close', - 'close -- Quit'], - }, + // append app-specific buttons... + 'app-buttons': Object.assign({}, + widgets.Buttons.actions.config['app-buttons'], + { + '_': ['minimize', + 'minimize -- Minimize'], + '↙': ['fullscreen', + 'toggleFullScreen -- Toggle fullscreen'], + '×': ['close', + 'close -- Quit'], + }), }, }) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 882b15bd..4783c023 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1978,6 +1978,12 @@ module.ContextActionMenu = core.ImageGridFeatures.Feature({ //--------------------------------------------------------------------- +// XXX mac seems not to have the utf gear icon... +var SETTINGS_ICON = + typeof(navigator) == 'undefined' ? 'settings' + : navigator.platform == 'Win32' ? '⛭' + : 'settings' + // XXX add context menu action to buttons... var ButtonsActions = actions.Actions({ config: { @@ -2010,8 +2016,6 @@ var ButtonsActions = actions.Actions({ 'browseActions: "/Collections/" -- Collection menu...', ]], 'C': ['crop', 'browseActions: "Crop/" -- Crop menu...'], - //'▤': ['collections', 'browseCollections -- Collections...'], - //'⛶': ['view', 'toggleSingleImage -- Single image / ribbon toggle'], '▷': ['slideshow', [ 'toggleSlideshow -- Slideshow', 'slideshowDialog -- Slideshow menu...', @@ -2021,6 +2025,7 @@ var ButtonsActions = actions.Actions({ // XXX not sure about these yet... 'secondary-buttons-state': 'off', 'secondary-buttons': { + //'': ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], //'Z': ['zoom', 'browseActions: "Zoom/" -- Zoom menu...'], //'+': ['zoom-in', 'zoomIn -- Zoom in'], //'-': ['zoom-out', 'zoomOut -- Zoom out'], @@ -2028,10 +2033,7 @@ var ButtonsActions = actions.Actions({ }, 'app-buttons': { - //'': ['touch-controls', 'toggleSideButtons -- Toggle touch controls'], - //'⛭': ['ui-settings', 'browseActions: "Interface/" -- Interface settings...'], - //'⛭': ['ui-settings', [ - 'settings': ['ui-settings', [ + [SETTINGS_ICON]: ['ui-settings', [ 'browseActions: "Interface/" -- Interface settings...', 'toggleSideButtons -- Toggle touch controls', ]],