Commit fff99b14 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

allow default iemgui colors to inherit colors from GUI presets

parent d9ac7f33
......@@ -357,9 +357,36 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] labels */
.iemgui:not(.mycanvas) .iem_label {
fill: #a49aea;
}
.iem_fg {
fill: #7569d7;
}
.iem_bg {
fill: #3e32a2;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: #7569d7;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: blue;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #cc9933;
}
/* test of xlet hover animation... this should
......@@ -414,19 +441,10 @@ text {
#save_before_quit {
color: white;
background-color: #3e32a2;
border:3px solid #cc9933;
padding: 12px;
margin: 12px;
box-shadow: 7px 7px 5px black;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
border:1px solid #cc9933;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
/*box-shadow: 7px 7px 5px black;*/
width: 70%;
left: 50%;
top: 50%;
......
......@@ -511,8 +511,35 @@ text.activated {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] labels */
.iemgui:not(.mycanvas) .iem_label {
fill: black;
}
.iem_fg {
fill: black;
}
.iem_bg {
fill: #fcfcfc;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: black;
}
/* text label for an iemgui */
.iemgui_label_selected {
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #e87216;
}
......@@ -920,4 +947,4 @@ input[type="color"] {
.label_color span {
position: relative;
bottom: 2px;
}
\ No newline at end of file
}
......@@ -347,8 +347,35 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] labels */
.iemgui:not(.mycanvas) .iem_label {
fill: black;
}
.iem_fg {
fill: black;
}
.iem_bg {
fill: #fcfcfc;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: black;
}
/* text label for an iemgui */
.iemgui_label_selected {
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: blue;
}
......
......@@ -442,7 +442,7 @@ text {
/* text inside selected objects */
:not(.gop).selected text {
fill: blue;
fill: #e87216;
}
/* for an object that didn't create */
......@@ -473,9 +473,36 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: black;
}
.iem_fg {
fill: black;
}
.iem_bg {
fill: #fcfcfc;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: black;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: blue;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #e87216;
}
/* test of xlet hover animation... this should
......@@ -535,15 +562,6 @@ text {
background-color: #f3f3f3;
border:1px solid #bbb;
padding: 12px;
margin: 12px;
box-shadow: 7px 7px 5px grey;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
width: 70%;
......
......@@ -383,9 +383,36 @@ text.activated {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: white;
}
.iem_fg {
fill: white;
}
.iem_bg {
fill: #030303;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: white;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: blue;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #ffff00;
}
/* test of xlet hover animation... this should
......@@ -460,19 +487,6 @@ text.activated {
color: white;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
width: 70%;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
/* Search dialog */
.search_body {
......
......@@ -363,8 +363,35 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: #657b83;
}
.iem_fg {
fill: #93a1a1;
}
.iem_bg {
fill: #fdf6e3;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: #93a1a1;
}
/* text label for an iemgui */
.iemgui_label_selected {
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #268bd2;
}
......@@ -422,15 +449,6 @@ text {
background-color: #fdf6e3;
border:1px solid #eee8d5;
padding: 12px;
margin: 12px;
box-shadow: 7px 7px 5px grey;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
width: 70%;
......
......@@ -363,9 +363,36 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: #839496;
}
.iem_fg {
fill: #586e75;
}
.iem_bg {
fill: #002b36;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: #586e75;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: #268bd2;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: #b58900;
}
/* test of xlet hover animation... this should
......@@ -423,15 +450,6 @@ text {
background-color: #002b36;
border:1px solid #839496;
padding: 12px;
margin: 12px;
box-shadow: 7px 7px 5px grey;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
width: 70%;
......
......@@ -323,13 +323,13 @@ text {
canvas.
*/
:not(.gop).selected .border {
stroke: green;
stroke: yellow;
display: inline;
}
/* text inside selected objects */
:not(.gop).selected text {
fill: green;
fill: yellow;
}
/* for an object that didn't create */
......@@ -360,9 +360,36 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iem_label {
fill: #4bd046;
}
.iem_fg {
fill: #0b560b;
}
.iem_bg {
fill: black;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: #0b560b;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: blue;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: yellow;
}
/* test of xlet hover animation... this should
......@@ -415,8 +442,9 @@ text {
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
color: #53b83b;
background-color: black;
border:1px solid green;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
......
......@@ -354,8 +354,35 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: black;
}
.iem_fg {
fill: black;
}
.iem_bg {
fill: #9fc79f;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: black;
}
/* text label for an iemgui */
.iemgui_label_selected {
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: blue;
}
......@@ -412,15 +439,6 @@ text {
background-color: #c0dcc0;
border:1px solid black;
padding: 12px;
margin: 12px;
box-shadow: 7px 7px 5px grey;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
width: 70%;
......
......@@ -292,7 +292,7 @@ text {
/* text inside selected objects */
:not(.gop).selected text {
fill: black;
fill: blue;
}
.graph .border {
......@@ -347,8 +347,35 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: black;
}
.iem_fg {
fill: black;
}
.iem_bg {
fill: #fcfcfc;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: black;
}
/* text label for an iemgui */
.iemgui_label_selected {
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: blue;
}
......
......@@ -309,7 +309,7 @@ text {
/* text inside selected objects */
:not(.gop).selected text {
fill: white;
fill: yellow;
}
.graph .border {
......@@ -364,9 +364,36 @@ text {
stroke-width: 1;
}
/* default label, foreground, and background colors for iemguis.
These classes get set only if the colors sent from the backend
are the black or white default colors for the widget.
By using the class we allow iemguis with default colors to inherit
from CSS. However, if the user changes these colors then the tag
is removed and the given SVG fill/stroke attribute applies. */
/* special case for [cnv] label */
.iemgui:not(.mycanvas) .iem_label {
fill: white;
}
.iem_fg {
fill: white;
}
.iem_bg {
fill: #030303;
}
/* special case for inner strokes that should match the border-- things like
[bng] circle stroke, etc. */
.iem_stroke {
stroke: white;
}
/* text label for an iemgui */
.iemgui_label_selected {
fill: blue;
.iemgui:not(.mycanvas) .iemgui_label_selected {
fill: yellow;
}
/* test of xlet hover animation... this should
......@@ -416,12 +443,6 @@ text {
color: white;
background-color: black;
border:1px solid white;
}
/* Dialog to ask to save the patch before quitting */
#save_before_quit {
background-color: #f3f3f3;
border:1px solid #f3f3f3;
padding: 12px;
/* margin: 12px; */
/*box-shadow: 7px 7px 5px grey;*/
......
......@@ -1445,10 +1445,47 @@ function create_svg_lock(cid) {
// the same grid with a lower opacity. That way the edit mode is always
// visually distinct from run mode.
var create_editmode_bg = function(cid, svg_elem) {
var data, cell_data_str, opacity_str, grid, size, pos;
var data, cell_data_str, opacity_str, grid, size, pos,
cc, // cell color
gc; // grid color
grid = showgrid[cid];
size = gridsize[cid];
pos = get_grid_coords(cid, svg_elem);
// Annoying crap because SVG img data can't
// call into an external style sheet...
switch(skin.get()) {
case "default":
case "footgun":
case "vanilla":
case "extended":
case "solarized":
cc = "#ddd";
gc = "#bbb";
break;
case "inverted":
case "vanilla_inverted":
case "extended_inverted":
cc = "#222";
gc = "#444";
break;
case "c64":
cc = "#5347b5";
gc = "#6458c6";
break;
case "strongbad":
cc = "#222";