Theme update from release 9.2

This commit is contained in:
Knut Sveidqvist 2022-10-19 14:37:48 +02:00
parent 904c011baf
commit 4838d63455
3 changed files with 16 additions and 8 deletions

View File

@ -22,12 +22,10 @@ const genSections = (options) => {
} }
.section-${i - 1} text { .section-${i - 1} text {
fill: ${options['cScaleLabel' + i]}; fill: ${options['cScaleLabel' + i]};
// fill: ${options['gitInv' + i]};
} }
.node-icon-${i - 1} { .node-icon-${i - 1} {
font-size: 40px; font-size: 40px;
color: ${options['cScaleLabel' + i]}; color: ${options['cScaleLabel' + i]};
// color: ${options['gitInv' + i]};
} }
.section-edge-${i - 1}{ .section-edge-${i - 1}{
stroke: ${options['cScale' + i]}; stroke: ${options['cScale' + i]};
@ -36,7 +34,7 @@ const genSections = (options) => {
stroke-width: ${sw}; stroke-width: ${sw};
} }
.section-${i - 1} line { .section-${i - 1} line {
stroke: ${options['lineColor' + i]} ; stroke: ${options['cScaleInv' + i]} ;
stroke-width: 3; stroke-width: 3;
} }

View File

@ -147,11 +147,18 @@ class Theme {
this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 }); this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });
} }
// Setup teh label color for the set // Setup the label color for the set
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor); this.scaleLabelColor =
this.scaleLabelColor !== 'calculated' && this.scaleLabelColor
? this.scaleLabelColor
: this.labelTextColor;
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { if (this.labelTextColor !== 'calculated') {
this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor; this.cScaleLabel0 = this.cScaleLabel0 || invert(this.labelTextColor);
this.cScaleLabel3 = this.cScaleLabel3 || invert(this.labelTextColor);
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.labelTextColor;
}
} }
/* Flowchart variables */ /* Flowchart variables */

View File

@ -121,7 +121,10 @@ class Theme {
} }
// Setup teh label color for the set // Setup teh label color for the set
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor); this.scaleLabelColor =
this.scaleLabelColor !== 'calculated' && this.scaleLabelColor
? this.scaleLabelColor
: this.labelTextColor;
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor; this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;