From 4d103f8b97f59b33ac0f6e9a047318acc92117e6 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 31 Oct 2018 17:34:47 +0100 Subject: [PATCH 1/2] Ensure filename is possibly centered below file icons in grid view Signed-off-by: Jan-Christoph Borchardt --- apps/files/css/files.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index 8ad255a34bf9b..a9c060db7b17e 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -863,6 +863,7 @@ table.dragshadow td.size { .innernametext { display: inline-block; + width: 100%; max-width: 80px; } From e5c1049d04f75ad6d624bab1ebd5906332eafc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 14 Jan 2019 22:03:40 +0100 Subject: [PATCH 2/2] Properly center text inside of the grid container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/css/files.scss | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index a9c060db7b17e..2c36ba8009ac9 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -852,19 +852,27 @@ table.dragshadow td.size { .nametext { display: flex; height: 44px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; margin-top: $grid-size - $grid-pad; - padding-right: 0; - text-align: right; + text-align: center; line-height: 44px; - padding-left: $grid-pad; // same as action icon right padding + padding: 0; .innernametext { display: inline-block; - width: 100%; - max-width: 80px; + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + &:before { + content: ''; + flex: 1; + min-width: 14px; + } + &:after { + content: ''; + flex: 1; + min-width: 44px; } /* No space for extension in grid view */ @@ -878,6 +886,8 @@ table.dragshadow td.size { margin-top: $grid-size - $grid-pad; display: flex; align-items: center; + position: absolute; + right: 0; .action { padding: $grid-pad; @@ -887,17 +897,8 @@ table.dragshadow td.size { align-items: center; justify-content: center; - &.action-share.permanent.shared-style span { - /* Do not show "Shared" text next to icon as there is no space */ - &:not(.icon) { - display: none; - } - - /* If an avatar is present, show that instead of the icon */ - &.avatar { - display: inline-block; - position: absolute; - } + &.action.action-share.permanent { + display: none; } /* In "Deleted files", do not show "Restore" text next to icon as there is no space */