tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-11-16 00:14:09 +03:00
parent 59f47b095e
commit 12cfc405fc
2 changed files with 45 additions and 20 deletions

View File

@ -385,7 +385,7 @@ button:hover {
width: 80px; width: 80px;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.5);
z-index: 900; z-index: 900;
} }
@ -395,17 +395,38 @@ button:hover {
.side-buttons-right { .side-buttons-right {
right: 0px; right: 0px;
} }
.side-buttons-left .button, .side-buttons-left .button,
.side-buttons-right .button { .side-buttons-right .button {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-content: center; align-content: center;
flex-direction:column; flex-direction: row;
padding: 10px;
line-height: 10px;
width: 80px; width: 80px;
height: 33.3%; height: 33.3%;
} }
.side-buttons-left .button {
justify-content: flex-end;
align-content: flex-start;
}
.side-buttons-right .button {
justify-content: flex-start;
align-content: flex-start;
}
.side-buttons-left .button:first-child {
flex-direction: column;
justify-content: flex-end;
align-items: flex-end;
}
.side-buttons-right .button:first-child {
flex-direction: column;
justify-content: flex-end;
align-items: flex-start;
}
.side-buttons-left .button:nth-child(1), .side-buttons-left .button:nth-child(1),
.side-buttons-left .button:nth-child(2), .side-buttons-left .button:nth-child(2),
.side-buttons-right .button:nth-child(1), .side-buttons-right .button:nth-child(1),

View File

@ -1130,19 +1130,19 @@ var ButtonsActions = actions.Actions({
'zoomOut -- Zoom out'], 'zoomOut -- Zoom out'],
}, },
'side-buttons-left-state': 'off', 'side-buttons-state': 'off',
'side-buttons-left': { 'side-buttons-left': {
'-': ['zoom-out', 'zoomOut -- Zoom out'], '-': ['zoom-out', 'zoomOut -- Zoom out'],
'^': ['up', 'shiftImageUp -- Shift image up'], '&#8613;': ['up', 'shiftImageUp -- Shift image up'],
'<': ['left', 'prevImage -- Focus previous image'], '&#10633;': ['left', 'prevImage -- Focus previous image'],
'v': ['down', 'shiftImageDown -- Shift image down'], '&#8615;': ['down', 'shiftImageDown -- Shift image down'],
}, },
'side-buttons-right-state': 'off',
'side-buttons-right': { 'side-buttons-right': {
'+': ['zoom-in', 'zoomIn -- Zoom in'], '+': ['zoom-in', 'zoomIn -- Zoom in'],
'^': ['up', 'shiftImageUp -- Shift image up'], '&#8613;': ['up', 'shiftImageUp -- Shift image up'],
'>': ['right', 'nextImage -- Focus next image'], '&#10634;': ['right', 'nextImage -- Focus next image'],
'v': ['down', 'shiftImageDown -- Shift image down'], '&#8615;': ['down', 'shiftImageDown -- Shift image down'],
}, },
}, },
@ -1151,14 +1151,16 @@ var ButtonsActions = actions.Actions({
toggleSecondaryButtons: ['Interface/Toggle secondary buttons', toggleSecondaryButtons: ['Interface/Toggle secondary buttons',
makeButtonControlsToggler('secondary-buttons')], makeButtonControlsToggler('secondary-buttons')],
// XXX make this a toggler... toggleSideButtons: ['Interface/Toggle side buttons', (function(){
toggleSideButtons: ['Interface/', (function(){
var left = makeButtonControlsToggler('side-buttons-left') var left = makeButtonControlsToggler('side-buttons-left')
var right = makeButtonControlsToggler('side-buttons-right') var right = makeButtonControlsToggler('side-buttons-right')
return function(){
return core.makeConfigToggler('side-buttons-state',
['on', 'off'],
function(){
left.apply(this, arguments) left.apply(this, arguments)
return right.apply(this, arguments) right.apply(this, arguments)
} })
})()], })()],
}) })
@ -1182,7 +1184,9 @@ module.Buttons = core.ImageGridFeatures.Feature({
['start', ['start',
function(){ function(){
this.toggleMainButtons(this.config['main-buttons-state'] || 'on') this.toggleMainButtons(this.config['main-buttons-state'] || 'on')
this.toggleSecondaryButtons(this.config['secondary-buttons-state'] || 'on') }], this.toggleSecondaryButtons(this.config['secondary-buttons-state'] || 'on')
this.toggleSideButtons(this.config['side-buttons-state'] || 'on')
}],
['load reload', ['load reload',
function(){ function(){
// update crop button status... // update crop button status...