Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default group colour option #235

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/LGraphGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export class LGraphGroup {
draw(graphCanvas: LGraphCanvas, ctx: CanvasRenderingContext2D): void {
const padding = 4

ctx.fillStyle = this.color
ctx.strokeStyle = this.color
ctx.fillStyle = this.color ?? LiteGraph.DEFAULT_GROUP_COLOR
ctx.strokeStyle = this.color ?? LiteGraph.DEFAULT_GROUP_COLOR
const [x, y] = this._pos
const [width, height] = this._size
ctx.globalAlpha = 0.25 * graphCanvas.editor_alpha
Expand Down
1 change: 1 addition & 0 deletions src/LiteGraphGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class LiteGraphGlobal {
DEFAULT_SHADOW_COLOR = "rgba(0,0,0,0.5)"
DEFAULT_GROUP_FONT = 24
DEFAULT_GROUP_FONT_SIZE?: any
DEFAULT_GROUP_COLOR?: string

WIDGET_BGCOLOR = "#222"
WIDGET_OUTLINE_COLOR = "#666"
Expand Down
Loading