From 69971c2f841863bae804933945c665ab2257861c Mon Sep 17 00:00:00 2001 From: Olmo Kramer Date: Tue, 13 Oct 2015 18:23:50 +0200 Subject: [PATCH 1/2] prepare for flex tree view --- styles/autohide-tree-view.less | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/styles/autohide-tree-view.less b/styles/autohide-tree-view.less index 0fb30a1..1940b78 100644 --- a/styles/autohide-tree-view.less +++ b/styles/autohide-tree-view.less @@ -1,8 +1,6 @@ @import "ui-variables"; .tree-view-resizer { - transform: translate(0, 0); - &[data-autohide] { min-width: 0; // allow the tree view to hide completely z-index: 100; // above the text-editor scrollbar @@ -16,10 +14,6 @@ padding-right: 1.5 * @component-padding + 16px; } - .list-tree { - width: -webkit-min-content; - } - .tree-view-autohide-hover-area { height: 100%; width: 100%; @@ -35,28 +29,26 @@ } tree-view-pin-button { - position: fixed; - top: (@component-padding / 2); - right: (@component-padding / 2); - max-width: calc(~"100% - " (@component-padding / 2)); + display: flex; + order: -10; + justify-content: flex-end; overflow: hidden; - color: transparent; - -webkit-text-stroke: 1px @text-color; - transform: rotateZ(30deg); - transition: transform 100ms, color 100ms; - &:hover { + &::before { + margin-top: 2px; + transform: rotateZ(30deg); + transition: transform 100ms, color 100ms; + color: transparent; + -webkit-text-stroke: 1px @text-color; + } + + &:hover::before { color: @text-color; } - &.active { + &.active::before { color: @text-color-highlight; - -webkit-text-stroke: 0; transform: rotateZ(0); } - - &::before { - margin: 0; - } } } From 4c0e57be260f22ff570d2e24369a0f097ee58085 Mon Sep 17 00:00:00 2001 From: Olmo Kramer Date: Tue, 13 Oct 2015 18:38:03 +0200 Subject: [PATCH 2/2] insert pin button as first child of the tree view --- lib/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index c768118..60c9404 100644 --- a/lib/main.js +++ b/lib/main.js @@ -84,7 +84,8 @@ function updateActivationState() { function start() { enableAutohide(); - getTreeViewEl().appendChild(pinView); + var treeViewEl = getTreeViewEl(); + treeViewEl.insertBefore(pinView, treeViewEl.firstChild); } function stop() {