mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2045812d92
commit
7fe16dd1a9
@ -305,7 +305,7 @@ button:hover {
|
|||||||
|
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
||||||
//z-index: 9999;
|
z-index: 4000;
|
||||||
}
|
}
|
||||||
.light .buttons {
|
.light .buttons {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
@ -340,23 +340,43 @@ button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* main controls... */
|
/* main buttons... */
|
||||||
.main-controls.buttons {
|
.main-buttons.buttons {
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
z-index: 4000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* fullscreen controls... */
|
/* secondary buttons... */
|
||||||
.fullscreen-controls.buttons {
|
/*
|
||||||
|
.secondary-buttons.buttons {
|
||||||
|
top: 0px;
|
||||||
|
right: 25%;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
.secondary-buttons.buttons {
|
||||||
|
top: 40px;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
.secondary-buttons.buttons .button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* app buttons... */
|
||||||
|
.app-buttons.buttons {
|
||||||
top: 0px;
|
top: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
z-index: 4000;
|
|
||||||
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
.fullscreen-controls .button.close:hover {
|
.app-buttons .button.close:hover {
|
||||||
background: rgba(255, 0, 0, 0.8);
|
background: rgba(255, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
|
.blur .app-buttons.buttons {
|
||||||
|
-webkit-filter: none !important;
|
||||||
|
filter: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -248,9 +248,9 @@ module.AppControl = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// Fullscreen app control buttons...
|
// Fullscreen app control buttons...
|
||||||
var FullScreenControllsActions = actions.Actions({
|
var AppControllsActions = actions.Actions({
|
||||||
config: {
|
config: {
|
||||||
'fullscreen-controls': {
|
'app-buttons': {
|
||||||
'_': ['minimize',
|
'_': ['minimize',
|
||||||
'minimize -- Minimize'],
|
'minimize -- Minimize'],
|
||||||
'↙': ['fullscreen allways-shown',
|
'↙': ['fullscreen allways-shown',
|
||||||
@ -260,16 +260,16 @@ var FullScreenControllsActions = actions.Actions({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleFullScreenControls: ['Interface/',
|
toggleAppButtons: ['Interface/',
|
||||||
widgets.makeButtonControlsToggler('fullscreen-controls')],
|
widgets.makeButtonControlsToggler('app-buttons')],
|
||||||
})
|
})
|
||||||
|
|
||||||
var FullScreenControlls =
|
var AppControlls =
|
||||||
module.FullScreenControlls = core.ImageGridFeatures.Feature({
|
module.AppControlls = core.ImageGridFeatures.Feature({
|
||||||
title: '',
|
title: '',
|
||||||
doc: '',
|
doc: '',
|
||||||
|
|
||||||
tag: 'ui-fullscreen-controls',
|
tag: 'ui-app-buttons',
|
||||||
depends: [
|
depends: [
|
||||||
'ui-app-control',
|
'ui-app-control',
|
||||||
],
|
],
|
||||||
@ -278,15 +278,15 @@ module.FullScreenControlls = core.ImageGridFeatures.Feature({
|
|||||||
'ui-status-bar',
|
'ui-status-bar',
|
||||||
],
|
],
|
||||||
|
|
||||||
actions: FullScreenControllsActions,
|
actions: AppControllsActions,
|
||||||
|
|
||||||
handlers: [
|
handlers: [
|
||||||
['toggleFullScreen',
|
['toggleFullScreen',
|
||||||
function(){
|
function(){
|
||||||
this.toggleFullScreenControls('on')
|
this.toggleAppButtons('on')
|
||||||
|
|
||||||
var fullscreen = this.toggleFullScreen('?')
|
var fullscreen = this.toggleFullScreen('?')
|
||||||
var buttons = this.ribbons.viewer.find('.fullscreen-controls')
|
var buttons = this.ribbons.viewer.find('.app-buttons')
|
||||||
|
|
||||||
// fullscreen button...
|
// fullscreen button...
|
||||||
buttons.find('.fullscreen.button')
|
buttons.find('.fullscreen.button')
|
||||||
|
|||||||
@ -54,8 +54,6 @@ core.ImageGridFeatures.Feature('viewer-testing', [
|
|||||||
|
|
||||||
'ui-ribbons-placement',
|
'ui-ribbons-placement',
|
||||||
|
|
||||||
'ui-fullscreen-controls',
|
|
||||||
|
|
||||||
// features...
|
// features...
|
||||||
'ui-ribbon-auto-align',
|
'ui-ribbon-auto-align',
|
||||||
//'ui-ribbon-align-to-order',
|
//'ui-ribbon-align-to-order',
|
||||||
@ -81,7 +79,8 @@ core.ImageGridFeatures.Feature('viewer-testing', [
|
|||||||
'external-editor',
|
'external-editor',
|
||||||
|
|
||||||
// chrome...
|
// chrome...
|
||||||
'ui-main-controls',
|
'ui-app-buttons',
|
||||||
|
'ui-buttons',
|
||||||
'ui-progress',
|
'ui-progress',
|
||||||
'ui-status-log',
|
'ui-status-log',
|
||||||
'ui-scale',
|
'ui-scale',
|
||||||
|
|||||||
@ -1100,10 +1100,10 @@ module.ContextActionMenu = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
var MainControlsActions = actions.Actions({
|
var ControlsActions = actions.Actions({
|
||||||
config: {
|
config: {
|
||||||
'main-controls-state': 'on',
|
'main-buttons-state': 'on',
|
||||||
'main-controls': {
|
'main-buttons': {
|
||||||
'☰': ['menu',
|
'☰': ['menu',
|
||||||
'browseActions -- Action menu...'],
|
'browseActions -- Action menu...'],
|
||||||
//'Crop<sub/>': ['crop',
|
//'Crop<sub/>': ['crop',
|
||||||
@ -1115,18 +1115,33 @@ var MainControlsActions = actions.Actions({
|
|||||||
'browseActions: "Mark/" -- Mark menu...'],
|
'browseActions: "Mark/" -- Mark menu...'],
|
||||||
//*/
|
//*/
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// XXX not sure about these yet...
|
||||||
|
'secondary-buttons-state': 'off',
|
||||||
|
'secondary-buttons': {
|
||||||
|
/*
|
||||||
|
'Z<sub/>': ['zoom',
|
||||||
|
'browseActions: "Zoom/" -- Zoom out'],
|
||||||
|
*/
|
||||||
|
'+': ['zoom-in',
|
||||||
|
'zoomIn -- Zoom in'],
|
||||||
|
'-': ['zoom-out',
|
||||||
|
'zoomOut -- Zoom out'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleMainControls: ['Interface/',
|
toggleMainButtons: ['Interface/',
|
||||||
makeButtonControlsToggler('main-controls')],
|
makeButtonControlsToggler('main-buttons')],
|
||||||
|
toggleSecondaryButtons: ['Interface/',
|
||||||
|
makeButtonControlsToggler('secondary-buttons')],
|
||||||
})
|
})
|
||||||
|
|
||||||
var MainControls =
|
var Controls =
|
||||||
module.MainControls = core.ImageGridFeatures.Feature({
|
module.Controls = core.ImageGridFeatures.Feature({
|
||||||
title: '',
|
title: '',
|
||||||
doc: '',
|
doc: '',
|
||||||
|
|
||||||
tag: 'ui-main-controls',
|
tag: 'ui-buttons',
|
||||||
depends: [
|
depends: [
|
||||||
'ui',
|
'ui',
|
||||||
],
|
],
|
||||||
@ -1135,18 +1150,23 @@ module.MainControls = core.ImageGridFeatures.Feature({
|
|||||||
'ui-status-bar',
|
'ui-status-bar',
|
||||||
],
|
],
|
||||||
|
|
||||||
actions: MainControlsActions,
|
actions: ControlsActions,
|
||||||
|
|
||||||
handlers: [
|
handlers: [
|
||||||
// main controls stuff...
|
|
||||||
['start',
|
['start',
|
||||||
function(){
|
function(){
|
||||||
this.toggleMainControls(this.config['main-controls-state'] || 'on') }],
|
this.toggleMainButtons(this.config['main-buttons-state'] || 'on')
|
||||||
|
this.toggleSecondaryButtons(this.config['secondary-buttons-state'] || 'on') }],
|
||||||
['load reload',
|
['load reload',
|
||||||
function(){
|
function(){
|
||||||
// update crop button status...
|
// update crop button status...
|
||||||
$('.main-controls.buttons .crop.button sub')
|
$('.main-buttons.buttons .crop.button sub')
|
||||||
.text(this.crop_stack ? this.crop_stack.length : '') }]
|
.text(this.crop_stack ? this.crop_stack.length : '') }],
|
||||||
|
['setScale',
|
||||||
|
function(){
|
||||||
|
// update crop button status...
|
||||||
|
$('.secondary-buttons.buttons .zoom.button sub')
|
||||||
|
.text(Math.round(this.screenwidth)) }],
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user