Skip to content

Commit ac68432

Browse files
committed
feat: add font size for textarea
1 parent 989b68f commit ac68432

File tree

2 files changed

+50
-7
lines changed

2 files changed

+50
-7
lines changed

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,18 @@ git pull
5050

5151
> Open settings to show options
5252
53-
![image](https://github.com/failfa-st/comfyui-extensions/assets/1148334/6efb211a-3215-4fcb-89c5-89ff0a2ece63)
53+
![image](https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/0653b112-b0f3-40b6-a6d9-3c6e443d67a8)
5454

5555
### Options
5656

57-
| Name | default | description |
58-
| ------------------ | ------- | -------------------------------- |
59-
| Links Render Mode | `2` | Render mode of connector lines |
60-
| Force Snap to Grid | `false` | Always snap nodes to grid |
57+
| Name | default | description |
58+
|--------------------|---------|---------------------------------|
59+
| Links Render Mode | `2` | Render mode of connector lines |
60+
| Force Snap to Grid | `false` | Always snap nodes to grid |
6161
| Force Box Shape | `false` | remove round corners permanently |
62-
| Render shadows | `true` | show/hide shadows |
63-
| Connections Width | `3` | width of connector lines |
62+
| Render shadows | `true` | show/hide shadows |
63+
| Connections Width | `3` | width of connector lines |
64+
| Font size | `10` | font-size of textareas |
6465

6566
## Buttons:
6667

extensions/textFields.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* Coded with love by Failfa.st
3+
* LICENSE: AGPL 3.0
4+
* https://github.com/failfa-st/failfast-comfyui-extensions/blob/main/LICENSE
5+
*
6+
* Visit https://github.com/failfa-st/failfast-comfyui-extensions for more info
7+
*
8+
* Hopmepage: https://failfa.st
9+
* GitHub: https://github.com/failfa-st
10+
* Discord: https://discord.com/invite/m3TBB9XEkb
11+
*/
12+
import { app } from "../../../scripts/app.js";
13+
import { $el } from "../../../scripts/ui.js";
14+
15+
/**
16+
* Font size of prompt fields
17+
*/
18+
19+
const connectionsWidthName = "Failfast.textFields";
20+
21+
app.registerExtension({
22+
name: connectionsWidthName,
23+
async init(app) {
24+
const style = $el("style");
25+
document.body.append(style);
26+
app.ui.settings.addSetting({
27+
id: connectionsWidthName,
28+
name: "Font size for textareas",
29+
type: "slider",
30+
attrs: {
31+
min: 10,
32+
max: 24,
33+
},
34+
tooltip: "The size of the font in prompts.",
35+
defaultValue: 10,
36+
onChange(value) {
37+
console.log(value);
38+
style.innerText = `.comfy-multiline-input {font-size: ${value}px}`;
39+
},
40+
});
41+
},
42+
});

0 commit comments

Comments
 (0)