Some style tweaks. Fixes #40

This commit is contained in:
rgthree
2023-10-04 20:40:37 -04:00
parent 72830f1c62
commit 5e3d02ec6f
3 changed files with 39 additions and 0 deletions
+13
View File
@@ -4,6 +4,7 @@ import { app } from "../../scripts/app.js";
// @ts-ignore
import {rgthreeConfig} from "./rgthree_config.js";
import { fixBadLinks } from "./link_fixer.js";
import { wait } from "./utils.js";
export enum LogLevel {
IMPORTANT = 1,
@@ -223,6 +224,18 @@ class Rgthree {
}, 100);
loadGraphData && loadGraphData.call(app, ...arguments);
}
wait(100).then(() => {
this.injectRgthreeCss();
});
}
private injectRgthreeCss() {
let link = document.createElement("link");
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'extensions/rgthree-comfy/rgthree.css';
document.head.appendChild(link);
}
private readonly eventsToFns = new Map<string, Set<(ev: Event) => void>>();
+15
View File
@@ -0,0 +1,15 @@
/* Fix node selector being crazy long b/c of array types. */
.litegraph.litesearchbox input,
.litegraph.litesearchbox select {
max-width: 250px;
}
/* There's no reason for this z-index to be so high. It layers on top of things it shouldn't,
(like pythongssss' image gallery, etc.) */
.comfy-multiline-input {
z-index: 2 !important;
}
.comfy-multiline-input:focus {
z-index: 3 !important;
}
+11
View File
@@ -1,6 +1,7 @@
import { app } from "../../scripts/app.js";
import { rgthreeConfig } from "./rgthree_config.js";
import { fixBadLinks } from "./link_fixer.js";
import { wait } from "./utils.js";
export var LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["IMPORTANT"] = 1] = "IMPORTANT";
@@ -193,6 +194,16 @@ class Rgthree {
}, 100);
loadGraphData && loadGraphData.call(app, ...arguments);
};
wait(100).then(() => {
this.injectRgthreeCss();
});
}
injectRgthreeCss() {
let link = document.createElement("link");
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'extensions/rgthree-comfy/rgthree.css';
document.head.appendChild(link);
}
addEventListener(event, fn) {
if (!this.eventsToFns.has(event)) {