diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-28 20:08:35 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-28 20:08:35 -0400 |
| commit | c45e21a8960298b77c3508b047cfbd9fdcf2c602 (patch) | |
| tree | a0fabfd203267963e7a8a648ac01793b08bbdcf4 /src/client/views/nodes/FontIconBox | |
| parent | 8ac260db2fdffc37ff9b6e91971f287df6a70528 (diff) | |
| parent | 63f9f9573dab9745d2f570e1917b325a474fdd93 (diff) | |
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/views/nodes/FontIconBox')
| -rw-r--r-- | src/client/views/nodes/FontIconBox/FontIconBox.scss | 4 | ||||
| -rw-r--r-- | src/client/views/nodes/FontIconBox/FontIconBox.tsx | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.scss b/src/client/views/nodes/FontIconBox/FontIconBox.scss index 2db285910..ab03a2318 100644 --- a/src/client/views/nodes/FontIconBox/FontIconBox.scss +++ b/src/client/views/nodes/FontIconBox/FontIconBox.scss @@ -10,6 +10,10 @@ height: 3px !important; } } +.fonticonbox { + margin: auto; + width: 100%; +} .menuButton { height: 100%; display: flex; diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx index d4898eb3c..b45774a75 100644 --- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx @@ -262,11 +262,13 @@ export class FontIconBox extends ViewBoxBaseComponent<ButtonProps>() { const script = ScriptCast(this.Document.onClick)?.script; const toggleStatus = script?.run({ this: this.Document, value: undefined, _readOnly_: true }).result as boolean; + // Colors const color = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.Color) as string; const background = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor) as string; const items = DocListCast(this.dataDoc.data); const selectedItems = items.filter(itemDoc => ScriptCast(itemDoc.onClick).script.run({ this: itemDoc, value: undefined, _readOnly_: true }).result).map(item => StrCast(item.toolType)); + return ( <MultiToggle tooltip={`Toggle ${tooltip}`} @@ -392,7 +394,7 @@ export class FontIconBox extends ViewBoxBaseComponent<ButtonProps>() { render() { return ( - <div style={{ margin: 'auto', width: '100%' }} onContextMenu={this.specificContextMenu}> + <div className="fonticonbox" onContextMenu={this.specificContextMenu}> {this.renderButton()} </div> ); |
