aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 8cae34d7d..d1561fd67 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -32,9 +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';
-const higflyout = require('@hig/flyout');
-export const { anchorPoints } = higflyout;
-export const Flyout = higflyout.default;
+import { SettingsManager } from '../util/SettingsManager';
enum UtilityButtonState {
Default,
@@ -59,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'}
@@ -167,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'
);
}
@@ -212,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'
);
}
@@ -379,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
@@ -514,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' : '' })}