diff --git a/build/main.js b/build/main.js index 14d9e54..6739562 100644 --- a/build/main.js +++ b/build/main.js @@ -30889,7 +30889,7 @@ exports['default'] = { var width = rect.width; var height = rect.height; - var left = x + width / 2 - _componentsMenu.MENU_WIDTH / 2, + var left = window.innerWidth / 2 - _componentsMenu.MENU_WIDTH / 2, top = y + height / 2 + MENU_TOP_SPACE; var dialogHeight = document.getElementById('fileMenu').offsetHeight; diff --git a/build/style.css b/build/style.css index 5d0032d..91ecdb2 100644 --- a/build/style.css +++ b/build/style.css @@ -280,14 +280,10 @@ button.coming-soon::after { .list .directory i { margin-right: 1.4rem; } -.list .file:active, -.list .directory:active { - background: #f0f0f0; -} .grid .file, .grid .directory { - flex: 1 0 30%; - max-width: 30%; + flex: 1 0 33.33%; + max-width: 33.33%; padding: 1.4rem 0.5rem; flex-direction: column; } @@ -317,6 +313,10 @@ button.coming-soon::after { .directory p { flex: 1 1; } +.file:active, +.directory:active { + background: #f0f0f0; +} .directory i { display: block; background: url(/img/Directory.svg) no-repeat; @@ -508,9 +508,6 @@ nav i { overflow-x: hidden; overflow-y: auto; } -.file-list.grid { - justify-content: space-between; -} .dialog { display: flex; flex-flow: column; diff --git a/releases/hawk-1.0.0.zip b/releases/hawk-1.0.0.zip index f1d72ca..47e25f5 100644 Binary files a/releases/hawk-1.0.0.zip and b/releases/hawk-1.0.0.zip differ diff --git a/src/js/components/mixins/entry.js b/src/js/components/mixins/entry.js index 248f287..8cd2c01 100644 --- a/src/js/components/mixins/entry.js +++ b/src/js/components/mixins/entry.js @@ -13,7 +13,7 @@ export default { let rect = React.findDOMNode(this.refs.container).getBoundingClientRect(); let {x, y, width, height} = rect; - let left = x + width / 2 - MENU_WIDTH / 2, + let left = window.innerWidth / 2 - MENU_WIDTH / 2, top = y + height / 2 + MENU_TOP_SPACE; let dialogHeight = document.getElementById('fileMenu').offsetHeight; diff --git a/src/less/components/entries.less b/src/less/components/entries.less index 906dc33..50566f9 100644 --- a/src/less/components/entries.less +++ b/src/less/components/entries.less @@ -17,16 +17,12 @@ i { margin-right: 1.4rem; } - - &:active { - background: @gray; - } } .grid .file, .grid .directory { - flex: 1 0 30%; + flex: 1 0 33.33%; - max-width: 30%; + max-width: 33.33%; padding: 1.4rem 0.5rem; @@ -60,6 +56,10 @@ p { flex: 1 1; } + + &:active { + background: @gray; + } } .directory i { diff --git a/src/less/components/file-list.less b/src/less/components/file-list.less index 469457f..1ba811c 100644 --- a/src/less/components/file-list.less +++ b/src/less/components/file-list.less @@ -9,8 +9,4 @@ overflow-x: hidden; overflow-y: auto; - - &.grid { - justify-content: space-between; - } }