aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/util/SettingsManager.scss15
-rw-r--r--src/client/util/SettingsManager.tsx6
-rw-r--r--src/client/views/ContextMenu.tsx2
-rw-r--r--src/client/views/ContextMenuItem.tsx14
-rw-r--r--src/client/views/PropertiesView.scss13
-rw-r--r--src/client/views/PropertiesView.tsx8
6 files changed, 38 insertions, 20 deletions
diff --git a/src/client/util/SettingsManager.scss b/src/client/util/SettingsManager.scss
index ec513e5d5..b855d58bc 100644
--- a/src/client/util/SettingsManager.scss
+++ b/src/client/util/SettingsManager.scss
@@ -142,7 +142,7 @@
.colorFlyout {
margin-top: 2px;
- margin-right: 25px;
+ margin-right: 18px;
&:hover {
cursor: pointer;
@@ -163,6 +163,7 @@
.preferences-color {
display: flex;
+ margin-top: 2px;
.preferences-color-text {
color: black;
@@ -174,6 +175,8 @@
.preferences-font {
display: flex;
+ height: 23px;
+ margin-top: 2px;
.preferences-font-text {
color: black;
@@ -194,6 +197,16 @@
}
}
+ .preferences-check {
+ color: black;
+ font-size: 9;
+ /* margin-top: 4; */
+ margin-right: 4;
+ margin-bottom: -3;
+ margin-left: 5;
+ margin-top: -1px;
+ }
+
.size-select {
width: 60px;
color: black;
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index 23ede2e0a..a0281bc5a 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -93,15 +93,15 @@ export class SettingsManager extends React.Component<{}> {
<select className="font-select" onChange={this.changeFontFamily} value={StrCast(Doc.UserDoc().fontFamily, "Times New Roman")} >
{fontFamilies.map(font => <option key={font} value={font} defaultValue={StrCast(Doc.UserDoc().fontFamily)}> {font} </option>)}
</select>
- <select className="size-select" onChange={this.changeFontSize} value={StrCast(Doc.UserDoc().fontSize, "7pt")}>
+ <select className="size-select" style={{ marginRight: "10px" }} onChange={this.changeFontSize} value={StrCast(Doc.UserDoc().fontSize, "7pt")}>
{fontSizes.map(size => <option key={size} value={size} defaultValue={StrCast(Doc.UserDoc().fontSize)}> {size} </option>)}
</select>
<div>
- Show title
+ <div className="preferences-check">Show title</div>
<input type="checkbox" onChange={e => Doc.UserDoc().showTitle = !Doc.UserDoc().showTitle} checked={BoolCast(Doc.UserDoc().showTitle)} />
</div>
<div>
- Alt Btns
+ <div className="preferences-check">Alt Buttons</div>
<input type="checkbox" onChange={e => Doc.UserDoc()["documentLinksButton-hideEnd"] = !Doc.UserDoc()["documentLinksButton-hideEnd"]}
checked={BoolCast(Doc.UserDoc()["documentLinksButton-hideEnd"])} />
</div>
diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx
index 349fd077c..952100cb0 100644
--- a/src/client/views/ContextMenu.tsx
+++ b/src/client/views/ContextMenu.tsx
@@ -215,7 +215,7 @@ export class ContextMenu extends React.Component {
@computed get menuItems() {
if (!this._searchString) {
- return this._items.map(item => <ContextMenuItem {...item} key={item.description} closeMenu={this.closeMenu} />);
+ return this._items.map(item => <ContextMenuItem {...item} key={item.description} closeMenu={this.closeMenu} pageX={this.pageX} />);
}
return this.filteredViews;
}
diff --git a/src/client/views/ContextMenuItem.tsx b/src/client/views/ContextMenuItem.tsx
index 22bfbe217..eddecb7a7 100644
--- a/src/client/views/ContextMenuItem.tsx
+++ b/src/client/views/ContextMenuItem.tsx
@@ -4,6 +4,7 @@ import { observer } from "mobx-react";
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { UndoManager } from "../util/UndoManager";
+import { NumberLiteralType } from "typescript";
export interface OriginalMenuProps {
description: string;
@@ -28,6 +29,7 @@ export type ContextMenuProps = OriginalMenuProps | SubmenuProps;
export class ContextMenuItem extends React.Component<ContextMenuProps & { selected?: boolean }> {
@observable private _items: Array<ContextMenuProps> = [];
@observable private overItem = false;
+ @observable private subRef = React.createRef<HTMLDivElement>();
constructor(props: ContextMenuProps | SubmenuProps) {
super(props);
@@ -51,6 +53,7 @@ export class ContextMenuItem extends React.Component<ContextMenuProps & { select
currentTimeout?: any;
static readonly timeout = 300;
_overPosY = 0;
+ _overPosX = 0;
onPointerEnter = (e: React.MouseEvent) => {
if (this.currentTimeout) {
clearTimeout(this.currentTimeout);
@@ -60,6 +63,7 @@ export class ContextMenuItem extends React.Component<ContextMenuProps & { select
return;
}
this._overPosY = e.clientY;
+ this._overPosX = e.clientX;
this.currentTimeout = setTimeout(action(() => this.overItem = true), ContextMenuItem.timeout);
}
@@ -75,6 +79,9 @@ export class ContextMenuItem extends React.Component<ContextMenuProps & { select
}
render() {
+
+
+
if ("event" in this.props) {
return (
<div className={"contextMenu-item" + (this.props.selected ? " contextMenu-itemSelected" : "")} onPointerDown={this.handleEvent}>
@@ -91,8 +98,13 @@ export class ContextMenuItem extends React.Component<ContextMenuProps & { select
} else if ("subitems" in this.props) {
const where = !this.overItem ? "" : this._overPosY < window.innerHeight / 3 ? "flex-start" : this._overPosY > window.innerHeight * 2 / 3 ? "flex-end" : "center";
const marginTop = !this.overItem ? "" : this._overPosY < window.innerHeight / 3 ? "20px" : this._overPosY > window.innerHeight * 2 / 3 ? "-20px" : "";
+
+ // here
const submenu = !this.overItem ? (null) :
- <div className="contextMenu-subMenu-cont" style={{ marginLeft: "90%", left: "0px", marginTop }}>
+ <div className="contextMenu-subMenu-cont"
+ style={{
+ marginLeft: window.innerHeight - this._overPosX - 50 > 0 ? "90%" : "20%", marginTop
+ }}>
{this._items.map(prop => <ContextMenuItem {...prop} key={prop.description} closeMenu={this.props.closeMenu} />)}
</div>;
if (!("noexpand" in this.props)) {
diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss
index 80f116029..e5f9e0417 100644
--- a/src/client/views/PropertiesView.scss
+++ b/src/client/views/PropertiesView.scss
@@ -47,7 +47,7 @@
}
.propertiesView-settings {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
font-size: 12.5px;
font-weight: bold;
@@ -87,7 +87,7 @@
}
.propertiesView-sharing {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
.propertiesView-sharing-title {
@@ -150,7 +150,7 @@
}
.propertiesView-appearance {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
.propertiesView-appearance-title {
@@ -187,7 +187,7 @@
}
.propertiesView-transform {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
.propertiesView-transform-title {
@@ -322,7 +322,7 @@
}
.propertiesView-fields {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
.propertiesView-fields-title {
@@ -394,6 +394,7 @@
cursor: auto;
}
}
+
.propertiesView-contexts {
.propertiesView-contexts-title {
@@ -465,7 +466,7 @@
}
.propertiesView-presTrails {
- border-bottom: 1px solid black;
+ //border-bottom: 1px solid black;
//padding: 8.5px;
.propertiesView-presTrails-title {
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 6e029188a..bb4657a2b 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -909,14 +909,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>
{!this.openSharing ? (null) :
<div className="propertiesView-sharing-content">
- <div className="propertiesView-acls-checkbox">
- <Checkbox
- color="primary"
- onChange={action(() => this.layoutDocAcls = !this.layoutDocAcls)}
- checked={this.layoutDocAcls}
- />;
- <div className="propertiesView-acls-checkbox-text">Layout</div>
- </div>
{this.sharingTable}
{/* <div className="change-buttons">
<button