elementary / files

File browser designed for elementary OS
https://elementary.io
GNU General Public License v3.0
322 stars 75 forks source link

Files storagebar not styled in dark mode #2162

Open fabiozaramella opened 3 years ago

fabiozaramella commented 3 years ago

What Happened

I just notice that granite's storage bars are not styled at all or not styled properly when using dark style.

Expected Behavior

It should be styled accordingly, assuring the correct degree of contrast.

Steps to Reproduce

  1. Set system style to Dark Style
  2. Open Files and click open a file/folder properties window or check style in Granite's Demo app (I haven't double checked with it)
  3. Notice the difference in styling with Light/Default Style

Sorry, I can't attach a screenshot at moment currently on mobile.

Platform Information

Full-updated Odin daily with stylesheet from master.

danirabbit commented 1 year ago

Transferring to Files since these styles now live there as this is an app-specific widget these days

jeremypw commented 1 year ago

@danirabbit Files now uses a Gtk.LevelBar not the Granite.StorageBar. As far as I can see this is styled by the elementary stylesheet and there only seems to be slight differences in colors used for filled blocks between the dark and light themes?

This is how it is looking in the Gtk4 port:

Screenshot from 2023-03-28 20 54 52 Screenshot from 2023-03-28 20 54 18

In master there is some custom CSS applied which overrides the stylesheet colors (not reimplemented in Gtk4 as yet):

Screenshot from 2023-03-28 21 00 53 Screenshot from 2023-03-28 21 00 36

Probably need to revisit what, if any custom css is required.

danirabbit commented 1 year ago

@jeremypw I believe this is referring to the storage bar widget in the properties window, not in the sidebar

jeremypw commented 1 year ago

@danirabbit Ah, sorry - in the Gtk4 port they both use Gtk.LevelBar. In master a Files.StorageBar (copied from Granite) is used which does not seem to have any advantage at the moment as its ability to display multiple blocks for different item descriptions is not used - maybe there were performance problems in trying to determine the number of each kind of file on a drive.

Maybe we should revisit what we want the properties window storage bar to show. #1816 is related.

Does a Gtk.LevelBar suffice? Do we need custom CSS?

danirabbit commented 1 year ago

Ah yeah if we're not actually doing any further breakdown of file types or whatever then using a Gtk.LevelBar makes a ton of sense.

It might be worth it to add a non-flat levelbar style but maybe not? I'm not super worried about it!

Do you think it's worth landing that change in the current git master separately?

jeremypw commented 1 year ago

OK, I'll backport the relevant code and push a PR.