GSoC'22 - File Highlighting in Thunar
About the feature
- The aim of this feature is to enable the user to highlight files/folders across the various different views.
- The feature can be toggled on/off through the View Menu.
- The highlight color can be selected by navigating to the Highlight tab in the properties dialog of the respective file. The properties dialog can be brought about by selecting the Properties option under the Context Menu (Right click on the desired file/folder to show the context-menu)
Requirement: GVFS (Gnome Virtual File System)
- The biggest challenge was figuring out how to paint the highlights on the various different views.
- The solution was to use a GtkCellLayoutDataFunc that is called on each item of the view. This way we can set the specific background color in the CellRenderer for each of the different items on view.
- Another challenge that came up was implementing the rounded corners.
- For this, modifications were made to the IconRenderer & a new custom TextRenderer was introduced. The trick was to use cairo to clip the backgrounds & paint the specific color.
This feature is possible with the support by Thunar's lead developers - Alexander Schwinn (alexxcons), Sergios - Anestis Kefalidis (SKefalidis) and Yongha Hwang (MShrimp4).