mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 21:38:13 +08:00
Set text color based on its fill when it's being edited
This commit is contained in:
@@ -400,6 +400,7 @@ export default defineComponent({
|
||||
this.textInput.style.width = displayEditableTextbox.line_width ? `${displayEditableTextbox.line_width}px` : "max-content";
|
||||
this.textInput.style.height = "auto";
|
||||
this.textInput.style.fontSize = `${displayEditableTextbox.font_size}px`;
|
||||
this.textInput.style.color = displayEditableTextbox.color.toRgbaCSS();
|
||||
|
||||
this.textInput.oninput = (): void => {
|
||||
if (this.textInput) this.editor.instance.update_bounds(textInputCleanup(this.textInput.innerText));
|
||||
|
||||
@@ -303,6 +303,9 @@ export class DisplayEditableTextbox extends JsMessage {
|
||||
readonly line_width!: undefined | number;
|
||||
|
||||
readonly font_size!: number;
|
||||
|
||||
@Type(() => Color)
|
||||
readonly color!: Color;
|
||||
}
|
||||
|
||||
export class DisplayRemoveEditableTextbox extends JsMessage {}
|
||||
|
||||
Reference in New Issue
Block a user