elementary / files

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

Selection icon doesn't follow accent color #1515

Open cassidyjames opened 4 years ago

cassidyjames commented 4 years ago

What Happened

I changed my accent color and the file selection :heavy_check_mark: didn't follow that color.

Expected Behavior

The selection icon should match the accent color. We can probably use a symbolic icon, and then style it inside of Files?

Platform Information

elementary OS 6 daily with stylesheet from master.

danirabbit commented 4 years ago

Since we'll have to do this across multiple repos, probably the best bet would be to use a Gtk.CheckButton and add Granite.STYLE_CLASS_BADGE. Then we can add the appropriate styles to Greenfield

jeremypw commented 4 years ago

Note that the current selection helper is rendered by a CellRenderer - it is not a widget itself. The whole view is the widget which draws everything inside - except the overlaybar. I could try adding a style-class when rendering it. It might also be possible to make the helper an overlay widget I suppose.

jeremypw commented 4 years ago

Adding a style class doesn't seem to affect the rendering of an icon :disappointed: It would be possible to colorize the icon but I do not know how to access the current accent color from the theme.

hanaral commented 3 years ago

It would be possible to colorize the icon but I do not know how to access the current accent color from the theme.

Doesn't the settings daemon store the user's colour now?

teamcons commented 1 month ago

Issue present in eOS 8, wayland session.

Accent color is Yellow We get Yellow backround on clicked files, with blue checkbox

It is a bit jarring

jeremypw commented 1 month ago

This is hard to fix elegantly while we are using an icon with a fixed color hard-coded in (selection-checked) to render the select marker with an IconRenderer. It will probably have to wait until we move away from views rendered with Gtk.CellRenderer to the new dynamic widgets in Gtk4 which use widgets for the items.

teamcons commented 1 month ago

This is hard to fix elegantly while we are using an icon with a fixed color hard-coded in (selection-checked) to render the select marker with an IconRenderer. It will probably have to wait until we move away from views rendered with Gtk.CellRenderer to the new dynamic widgets in Gtk4 which use widgets for the items.

Thank you for your answer When would this be planned, if i may ask ?

jeremypw commented 1 month ago

Although an experimental branch using Gtk4 and dynamic views was produced a while ago (see #2084), the diff with the main branch made it impractical to review. So the intention is to reduce the diff as much as possible and the first port will have conventional views with CellRenderers. Hopefully that can be accomplished during the lifetime of OS8. Once that is done then work on dynamic views can be started.