Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Theme Has Illegible Text Color for File Sizes in MegaBytes and GigaBytes #11441

Closed
hellbee opened this issue Sep 28, 2018 · 3 comments
Closed
Labels

Comments

@hellbee
Copy link

hellbee commented Sep 28, 2018

Steps to reproduce

  1. Enable Dark Theme
  2. Have Files/Directories that Have File Sizes in MegaBytes or Gigabytes
  3. Login and view files/directories

Expected behaviour

Text should be formatted in grey to match the color of directory/file sizes reported in KiloBytes.

Actual behaviour

Text is rendered in black, making it illegible in the dark theme. The issue is clear in the screenshot I illustrated.

nc_bug1
nc_bug2

Server configuration

Operating system: FreeBSD

Web server: Nginx

Database: Postgresql

PHP version: 7.1

Nextcloud version: 14.1

Updated from an older Nextcloud/ownCloud or fresh install: Updated from version 14.0

Where did you install Nextcloud from: FreeBSD ports

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #10946 (Dark Theme - Text unreadable), #4240 (File Size Limit), #7401 (Theming on light color), #11131 (Accessibility dark theme unusable), and #10457 (issues with custom color and dark theme).

@realies
Copy link

realies commented Sep 30, 2018

Can second that. There are some weird CSS colour values to the text such as rgb(-1093613224318,-1093613224318,-1093613224318). The Modified column seems to have some sort of a text colour gradient that is also there for the default theme: https://i.snag.gy/S0cviw.jpg

Nothing changes when disabling all apps other than Accessibility and switching the theme off/on.

@cole8888
Copy link

I've found a temporary "solution" to this. If you edit the file located at: .... nextcloud/apps/files/js/filelist.js
The edit I made is as follows.

  1. Within filelist.js search for the string: humanFileSize
  2. This will bring you to where the formula used to change the font color based on the file size is located. It should look like this: sizeColor = Math.round(118-Math.pow((fileData.size/(1024*1024)),2));
  3. I simply set it equal to 118 (legible file size color) My code now looks like this: sizeColor = 118;
  4. Directly below this block of code you will see another variable called modifiedColor be declared. I set this one to 118 too.
  5. Saved the file and restarted all the programs associated (php, nginx, redis)
  6. Cleared my browser's cache (would not show changes unless I did this)
  7. And I got this:
    image

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants