updated progress bar style...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-12-12 15:29:37 +03:00
parent 19aedcc8cb
commit a7675479ac
4 changed files with 84 additions and 75 deletions

View File

@ -1728,19 +1728,13 @@ progress {
-moz-appearance: none;
appearance: none;
height: 8px;
height: 2px;
}
progress::-webkit-progress-bar {
background: transparent;
border: solid 1px gray;
border-radius: 3px;
padding: 1px;
box-shadow: 0px 2px 5px rgba(0,0,0,0.2) inset;
background: rgba(0,0,0,0.5);
}
progress::-webkit-progress-value {
background: yellow;
border-radius: 2px;
box-shadow: -1px -1px 5px -2px rgba(0,0,0,0.8) inset;
}
/*
@ -1774,13 +1768,12 @@ progress:not(value)::-webkit-progress-bar {
top: 30px;
margin: 5px;
padding: 2px;
border-radius: 5px;
background: rgba(0,0,0,0.1);
z-index: 4000;
}
.progress-container:hover {
background: rgba(0,0,0,0.8);
background: rgba(0,0,0,0.2);
}
.progress-container:empty {
display: none;
@ -1894,22 +1887,23 @@ progress:not(value)::-webkit-progress-bar {
opacity: 0.8;
}
.light.viewer progress::-webkit-progress-bar {
border: solid 1px silver;
background: rgba(0,0,0,0.1);
}
.light.viewer progress::-webkit-progress-value {
background: red;
}
.light.viewer .progress-container {
background: rgba(0,0,0,0.05);
background: rgba(0, 0, 0, 0.03);
}
.light.viewer .progress-container:hover {
background: rgba(0,0,0,0.5);
background: rgba(0, 0, 0, 0.05);
}
.light.viewer .progress-bar {
color: silver;
}
.light.viewer .overlay-info .spacer {
opacity: 0.6,
color: rgba(0,0,0,0.6);
}
/*@import "theme-gray";*/
.gray.viewer,
@ -1944,6 +1938,18 @@ progress:not(value)::-webkit-progress-bar {
.dark.viewer .ribbon-indicator:hover:after {
opacity: 0.8;
}
.dark.viewer progress::-webkit-progress-bar {
background: rgba(255,255,255,0.2);
}
.dark.viewer .progress-container {
border: solid 1px transparent;
}
.dark.viewer .progress-container:hover {
border: solid 1px rgba(255, 255,255, 0.1);
}
.dark.viewer .progress-container:hover progress::-webkit-progress-bar {
background: rgba(255,255,255,0.3);
}

View File

@ -377,16 +377,6 @@ module.GLOBAL_KEYBOARD = {
/*********************************************************************/
var stoppableKeyboardRepeat = function(handler, check){
return function(evt){
return check() && handler(evt)
}
}
/*********************************************************************/
// XXX add a key binding list UI...
// XXX add loading/storing of kb bindings...
@ -474,7 +464,7 @@ var KeyboardActions = actions.Actions({
//this.ribbons.viewer
var handler =
this.__keyboard_handler =
stoppableKeyboardRepeat(
keyboard.stoppableKeyboardRepeat(
keyboard.makeKeyboardHandler(
function(){ return that.__keyboard_config },
function(k){ window.DEBUG && console.log('KEY:', k) },
@ -486,7 +476,7 @@ var KeyboardActions = actions.Actions({
} else {
var handler =
this.__keyboard_handler =
stoppableKeyboardRepeat(
keyboard.stoppableKeyboardRepeat(
keyboard.dropRepeatingkeys(
keyboard.makeKeyboardHandler(
function(){ return that.__keyboard_config },

View File

@ -25,21 +25,21 @@ var ProgressActions = actions.Actions({
// Progress bar widget...
//
// Create progress bar...
// .testProgress('text')
// .showProgress('text')
//
// Update progress bar (value, max, msg)...
// .testProgress('text', 0, 10)
// .testProgress('text', 10, 50, 'message')
// .showProgress('text', 0, 10)
// .showProgress('text', 10, 50, 'message')
//
// Update progress bar value (has no effect if max is not set)...
// .testProgress('text', 10)
// .showProgress('text', 10)
//
// Close progress bar...
// .testProgress('text', 'close')
// .showProgress('text', 'close')
//
// Relative progress modification...
// .testProgress('text', '+1')
// .testProgress('text', '+0', '+1')
// .showProgress('text', '+1')
// .showProgress('text', '+0', '+1')
//
//
// XXX should we report errors and stoppages??? (error state??)

View File

@ -179,6 +179,58 @@ function normalizeModifiers(c, m, a, s){
}
// supported action format:
// <actio-name>[!][: <args>][-- <doc>]
//
// <args> can contain space seporated:
// - numbers
// - strings
// - non-nested arrays or objects
//
// XXX add support for suffix to return false...
var parseActionCall =
module.parseActionCall =
function parseActionCall(txt){
// split off the doc...
var c = txt.split('--')
var doc = (c[1] || '').trim()
// the actual code...
c = c[0].split(':')
// action and no default flag...
var action = c[0].trim()
var no_default = action.slice(-1) == '!'
action = no_default ? action.slice(0, -1) : action
// parse arguments...
var args = JSON.parse('['+(
((c[1] || '')
.match(/"[^"]*"|'[^']*'|\{[^\}]*\}|\[[^\]]*\]|\d+|\d+\.\d*|null/gm)
|| [])
.join(','))+']')
return {
action: action,
arguments: args,
doc: doc,
'no-default': no_default,
}
}
// Event handler wrapper to stop handling keys if check callback does
// not pass (returns false)...
var stoppableKeyboardRepeat =
module.stoppableKeyboardRepeat =
function(handler, check){
return function(evt){
return check() && handler(evt)
}
}
// Event handler wrapper that will drop identical keys repeating at rate
// greater than max_rate
//
@ -224,45 +276,6 @@ function dropRepeatingkeys(handler, max_rate){
// supported action format:
// <actio-name>[!][: <args>][-- <doc>]
//
// <args> can contain space seporated:
// - numbers
// - strings
// - non-nested arrays or objects
//
// XXX add support for suffix to return false...
var parseActionCall =
module.parseActionCall =
function parseActionCall(txt){
// split off the doc...
var c = txt.split('--')
var doc = (c[1] || '').trim()
// the actual code...
c = c[0].split(':')
// action and no default flag...
var action = c[0].trim()
var no_default = action.slice(-1) == '!'
action = no_default ? action.slice(0, -1) : action
// parse arguments...
var args = JSON.parse('['+(
((c[1] || '')
.match(/"[^"]*"|'[^']*'|\{[^\}]*\}|\[[^\]]*\]|\d+|\d+\.\d*|null/gm)
|| [])
.join(','))+']')
return {
action: action,
arguments: args,
doc: doc,
'no-default': no_default,
}
}
/* Key handler getter
*
* For doc on format see makeKeyboardHandler(...)