From 36f7b54914b4d5fce98de3a6d83f1b186ebb17d1 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 14 Aug 2020 15:11:06 -0400 Subject: fixed icons for minimize & rotation on DocumentDecorations --- src/client/views/DocumentDecorations.scss | 34 +++++++++++++++---------------- src/client/views/DocumentDecorations.tsx | 15 ++++---------- src/client/views/MainView.tsx | 3 ++- 3 files changed, 23 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index 5401623e8..1e8cfdff4 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -21,14 +21,6 @@ $linkGap : 3px; background: none; } - - .documentDecorations-rotation { - pointer-events: auto; - cursor: alias; - width: 10px; - height: 10px; - } - .documentDecorations-resizer { pointer-events: auto; background: $alt-accent; @@ -76,11 +68,17 @@ $linkGap : 3px; grid-column-end: 7; } + #documentDecorations-rotation, #documentDecorations-borderRadius { - grid-column-start: 5; - grid-column-end: 7; + grid-column: 5; + grid-row: 4; border-radius: 100%; background: dimgray; + height: 8; + right: -12; + top: 12; + position: relative; + pointer-events: all; .borderRadiusTooltip { width: 10px; @@ -88,6 +86,11 @@ $linkGap : 3px; position: absolute; } } + #documentDecorations-rotation { + background: transparent; + right: -15; + } + #documentDecorations-topLeftResizer, #documentDecorations-bottomRightResizer { @@ -193,11 +196,11 @@ $linkGap : 3px; .documentDecorations-iconifyButton { opacity: 1; grid-column-start: 4; - grid-column-end: 5; + grid-column-end: 4; pointer-events: all; text-align: center; - left: -25px; - top: -2px; + right: 0; + top: 0; cursor: pointer; position: absolute; background: transparent; @@ -206,14 +209,11 @@ $linkGap : 3px; .documentDecorations-openInTab { opacity: 1; - grid-column-start: 4; + grid-column-start: 5; grid-column-end: 5; pointer-events: all; text-align: center; cursor: pointer; - width: 15px; - margin-left: -8px; - margin-top: auto; } .documentDecorations-closeButton { diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index c5e3e6752..03746a1d2 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -660,13 +660,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> bounds.y = bounds.b - (this._resizeBorderWidth + this._linkBoxHeight + this._titleHeight); } var offset = 0; - var rotButton = <>; - //make offset larger for ink to edit points - if (seldoc.rootDoc.type === DocumentType.INK) { - offset = 20; - rotButton =
; - } + let useRotation = seldoc.rootDoc.type === DocumentType.INK; return (
{SelectionManager.SelectedDocuments().length !== 1 || seldoc.Document.type === DocumentType.INK ? (null) :
{`${seldoc.finalLayoutKey.includes("icon") ? "De" : ""}Iconify Document`}
} placement="top">
- {"_"} +
}
Open In a New Pane
} placement="top">
{SelectionManager.SelectedDocuments().length === 1 ? : "..."}
- {rotButton}
e.preventDefault()}>
onPointerDown={this.onSelectorUp} onContextMenu={e => e.preventDefault()}>
} -
e.preventDefault()}>
+
e.preventDefault()}>{useRotation && "⟲"}
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index db5325713..059e1f566 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -182,7 +182,8 @@ export class MainView extends React.Component { fa.faIndent, fa.faEyeDropper, fa.faPaintRoller, fa.faBars, fa.faBrush, fa.faShapes, fa.faEllipsisH, fa.faHandPaper, fa.faMap, fa.faUser, faHireAHelper, fa.faDesktop, fa.faTrashRestore, fa.faUsers, fa.faWrench, fa.faCog, fa.faMap, fa.faBellSlash, fa.faExpandAlt, fa.faArchive, fa.faBezierCurve, fa.faCircle, fa.faLongArrowAltRight, fa.faPenFancy, fa.faAngleDoubleRight, faBuffer, fa.faExpand, fa.faUndo, fa.faSlidersH, fa.faAngleDoubleLeft, fa.faAngleUp, - fa.faAngleDown, fa.faPlayCircle, fa.faClock, fa.faRocket, fa.faExchangeAlt, faBuffer, fa.faHashtag, fa.faAlignJustify, fa.faCheckSquare, fa.faListUl); + fa.faAngleDown, fa.faPlayCircle, fa.faClock, fa.faRocket, fa.faExchangeAlt, faBuffer, fa.faHashtag, fa.faAlignJustify, fa.faCheckSquare, fa.faListUl, + fa.faWindowMinimize, fa.faWindowRestore); this.initEventListeners(); this.initAuthenticationRouters(); } -- cgit v1.2.3-70-g09d2