Adds highlight to advanced widgets (#317)

* Adds highlight to advanced widgets

* Update snapshot
This commit is contained in:
pythongosssss
2024-11-18 18:16:52 +00:00
committed by GitHub
parent a23da8eb17
commit 1bec315427
3 changed files with 3 additions and 1 deletions

View File

@@ -5665,7 +5665,6 @@ export class LGraphCanvas {
const show_text = this.ds.scale > 0.5
ctx.save()
ctx.globalAlpha = this.editor_alpha
const outline_color = LiteGraph.WIDGET_OUTLINE_COLOR
const background_color = LiteGraph.WIDGET_BGCOLOR
const text_color = LiteGraph.WIDGET_TEXT_COLOR
const secondary_text_color = LiteGraph.WIDGET_SECONDARY_TEXT_COLOR
@@ -5675,6 +5674,7 @@ export class LGraphCanvas {
const w = widgets[i]
if (w.hidden || (w.advanced && !node.showAdvanced)) continue
const y = w.y || posY
const outline_color = w.advanced ? LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR : LiteGraph.WIDGET_OUTLINE_COLOR
if (w === this.link_over_widget) {
ctx.fillStyle = this.default_connection_color_byType[this.link_over_widget_type] ||

View File

@@ -51,6 +51,7 @@ export class LiteGraphGlobal {
WIDGET_BGCOLOR = "#222"
WIDGET_OUTLINE_COLOR = "#666"
WIDGET_ADVANCED_OUTLINE_COLOR = "rgba(56, 139, 253, 0.8)"
WIDGET_TEXT_COLOR = "#DDD"
WIDGET_SECONDARY_TEXT_COLOR = "#999"

View File

@@ -127,6 +127,7 @@ LiteGraphGlobal {
],
"VERSION": 0.4,
"VERTICAL_LAYOUT": "vertical",
"WIDGET_ADVANCED_OUTLINE_COLOR": "rgba(56, 139, 253, 0.8)",
"WIDGET_BGCOLOR": "#222",
"WIDGET_OUTLINE_COLOR": "#666",
"WIDGET_SECONDARY_TEXT_COLOR": "#999",