diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-10-19 15:31:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:31:51 +0200 |
commit | 6a979a0ba0d59ceda2a117cc4fe5efee4b048b4b (patch) | |
tree | 7487ce3d0cf71258c95dce0bff5dc6f66f9bf475 /apps/files/js/filelist.js | |
parent | d35b6513cdf799831c72022bee688230812201f8 (diff) | |
parent | 30cbd137e8c32c32920292e285c06466392e89f9 (diff) | |
download | nextcloud-server-6a979a0ba0d59ceda2a117cc4fe5efee4b048b4b.tar.gz nextcloud-server-6a979a0ba0d59ceda2a117cc4fe5efee4b048b4b.zip |
Merge pull request #11823 from lex111/fix-illegible-text-color-in-size-and-modified-columns
Fix illegible text color in columns Size and Modified on dark theme
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 771ec495a2d..0a6620ab22c 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1384,6 +1384,10 @@ // rgb(118, 118, 118) / #767676 // min. color contrast for normal text on white background according to WCAG AA sizeColor = Math.round(118-Math.pow((fileData.size/(1024*1024)),2)); + + if (OCA.Accessibility && OCA.Accessibility.theme === 'themedark') { + sizeColor = Math.abs(sizeColor); + } } else { simpleSize = t('files', 'Pending'); } @@ -1403,6 +1407,16 @@ if (modifiedColor >= '118') { modifiedColor = 118; } + if (OCA.Accessibility && OCA.Accessibility.theme === 'themedark') { + modifiedColor = Math.abs(modifiedColor); + + // ensure that the dimmest color is still readable + // rgb(130, 130, 130) / #828282 + // min. color contrast for normal text on black background according to WCAG AA + if (modifiedColor < 130) { + modifiedColor = 130; + } + } var formatted; var text; if (mtime > 0) { |