diff options
| author | bobzel <zzzman@gmail.com> | 2023-10-10 12:12:14 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-10-10 12:12:14 -0400 |
| commit | 9f4c6d895eb6ff495a99463e8150c5d1dff26c5b (patch) | |
| tree | 161d543d60ae4360bd1133cdad5283af8ab4b094 /src/client/views/PropertiesButtons.tsx | |
| parent | 3884211ab83db30965a4dc1c4b3133684904ebb9 (diff) | |
| parent | c9d83841221620137e89920198ffaeab2677b439 (diff) | |
merged with master
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
| -rw-r--r-- | src/client/views/PropertiesButtons.tsx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 42db0b9be..d1561fd67 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -32,6 +32,7 @@ import { TfiBarChart } from 'react-icons/tfi'; import { CiGrid31 } from 'react-icons/ci'; import { RxWidth } from 'react-icons/rx'; import { Dropdown, DropdownType, IListItemProps, Toggle, ToggleType, Type } from 'browndash-components'; +import { SettingsManager } from '../util/SettingsManager'; enum UtilityButtonState { Default, @@ -56,8 +57,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { return !targetDoc ? null : ( <Toggle toggleStatus={BoolCast(targetDoc[property])} + tooltip={tooltip(BoolCast(targetDoc[property]))} text={label(targetDoc?.[property])} - color={StrCast(Doc.UserDoc().userColor)} + color={SettingsManager.userColor} icon={icon(targetDoc?.[property] as any)} iconPlacement={'left'} align={'flex-start'} @@ -164,9 +166,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get forceActiveButton() { //select text return this.propertyToggleBtn( - on => (on ? 'INACTIVE INTERACTION' : 'ACTIVE INTERACTION'), + on => (on ? 'SELECT TO INTERACT' : 'ALWAYS INTERACTIVE'), '_forceActive', - on => `${on ? 'Select to activate' : 'Contents always active'} `, + on => `${on ? 'Document must be selected to interact with its contents' : 'Contents always active (respond to click/drag events)'} `, on => <MdTouchApp /> // 'eye' ); } @@ -209,9 +211,12 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get layout_fitWidthButton() { return this.propertyToggleBtn( - on => (on ? 'RESTRICT WIDTH' : 'FIT WIDTH'), //'Fit\xA0Width', + on => (on ? 'SCALED VIEW' : 'READING VIEW'), //'Fit\xA0Width', '_layout_fitWidth', - on => `${on ? "Don't" : 'Do'} fit content to width of container`, + on => + on + ? "Scale document so it's width and height fit container (no effect when document is viewed on freeform canvas)" + : "Scale document so it's width fits container and its height expands/contracts to fit available space (no effect when document is viewed on freeform canvas)", on => (on ? <AiOutlineColumnWidth /> : <RxWidth />) // 'arrows-alt-h' ); } @@ -376,10 +381,11 @@ export class PropertiesButtons extends React.Component<{}, {}> { <Dropdown tooltip={'Choose onClick behavior'} items={items} + closeOnSelect={true} selectedVal={this.onClickVal} setSelectedVal={val => this.handleOptionChange(val as string)} title={'Choose onClick behaviour'} - color={StrCast(Doc.UserDoc().userColor)} + color={SettingsManager.userColor} dropdownType={DropdownType.SELECT} type={Type.SEC} fillWidth @@ -511,7 +517,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })} {toggle(this.maskButton, { display: !isInk ? 'none' : '' })} {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} - {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} + {toggle(this.chromeButton, { display: isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {/* {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} */} {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} |
