summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAlexey Pyltsyn <lex61rus@gmail.com>2018-10-14 14:48:39 +0300
committerAlexey Pyltsyn <lex61rus@gmail.com>2018-10-16 21:06:01 +0300
commit5911367a18f362836e43222a4a3ba61f08b7a123 (patch)
tree012a91f6a93c83096402c25c03d52609bce4fd61 /apps
parent0fca815b4dd601381a909656a1e3e7a7e89714d2 (diff)
downloadnextcloud-server-5911367a18f362836e43222a4a3ba61f08b7a123.tar.gz
nextcloud-server-5911367a18f362836e43222a4a3ba61f08b7a123.zip
Fix illegible text color in columns Size and Modified on dark theme
Signed-off-by: Alexey Pyltsyn <lex61rus@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 94052b10b33..d835847bece 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 (oc_defaults.themeName === 'themedark') {
+ sizeColor = Math.abs(sizeColor);
+ }
} else {
simpleSize = t('files', 'Pending');
}
@@ -1403,6 +1407,16 @@
if (modifiedColor >= '118') {
modifiedColor = 118;
}
+ if (oc_defaults.themeName === '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) {