From 772a8882c3bbdeaaa7bea3436bdb0dbdb6712fe3 Mon Sep 17 00:00:00 2001 From: simurai Date: Thu, 26 Apr 2018 12:55:57 +0900 Subject: [PATCH] Show directories when using arrow keys And have sticky projects enabled. --- styles/config.less | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/styles/config.less b/styles/config.less index 06f5e3f..790f597 100644 --- a/styles/config.less +++ b/styles/config.less @@ -127,10 +127,22 @@ background: @button-background-color-selected; } - // Fix sticky header from covering auto-revealed items - .list-item.selected { + // Fix sticky header from covering auto-revealed files + .entry.file.selected { padding-top: @ui-tab-height; margin-top: -@ui-tab-height; } + + // Fix sticky header from covering auto-revealed directories when using up/down keys + // for directories, scroll test moves to .header, see https://github.com/atom/tree-view/blob/d2857ad4d7eeb7dad5cf94b33257a8740211480e/lib/tree-view.coffee#L839 + .entry.directory.selected:not(.project-root) { + & > .header { + padding-top: @ui-tab-height; + margin-top: -@ui-tab-height; + } + &::before { + margin-top: @ui-tab-height; + } + } } }