Too small space between the sidebar and the list arrows

Bug #1212010 reported by pafosdfkapos
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Geary
Confirmed
Undecided
Unassigned
Nautilus
New
Undecided
Unassigned
Shotwell
Confirmed
Undecided
Unassigned
elementary Stylesheet
Invalid
Undecided
Unassigned

Bug Description

There is too small space between the sidebar edge and the list arrows. If the list is not expanded, there is only 1px space free space. If the list is expanded, the arrow is already cut off and not displayed correctly. Look at the attached picture.

The space between the edge of the sidebar and the list arrows should be few pixels wider, to make it look much better and to improve the user experience.

Revision history for this message
pafosdfkapos (pafosdfkapos) wrote :
Revision history for this message
Danielle Foré (danrabbit) wrote :

This is a bug in Geary. Notice that Files, Music, etc are not affected

Changed in egtk:
status: New → Invalid
Revision history for this message
Jim Nelson (yorba-jim) wrote :

I don't believe this is a Geary bug specifically. This affects Shotwell as well, in both its sidebar and the plugin list (in Edit -> Preferences).

(Also in Shotwell's Edit -> Preferences, there's an excessive amount of whitespace between the checkboxes and their associated text.)

Another example: if you install and run Nautilus, View -> Sidebar -> Tree, the sidebar arrows exhibit the same behavior.

I believe this is a theme bug.

Revision history for this message
Jim Nelson (yorba-jim) wrote :

I'm reopening the eGTK bug for the above reasons.

Changed in egtk:
status: Invalid → New
Changed in geary:
status: New → Confirmed
Revision history for this message
Danielle Foré (danrabbit) wrote :

Jim, I do have " -GtkTreeView-horizontal-separator: 6px;" and margin and padding seem to have no effect. AFAIK, we had to fix this in granite.sourcelist

FWIW, this problem also persists in Adwaita

Changed in egtk:
status: New → Incomplete
Revision history for this message
Jim Nelson (yorba-jim) wrote :

We've attacked margin and padding in GtkTreeView in the past (for other reasons) and can only surmise that they're broken.

Can you point me to the commit in granite.sourcelist that fixes this? We might be able to port it to Shotwell and Geary.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Jim, I'm guessing this is it: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1127

But I'm not exactly an expert on Granite (or even Vala :p) I'll see if I can get someone else to confirm ;)

Revision history for this message
Danielle Foré (danrabbit) wrote :

Okay Jim, according to David, we're defining a style property here at line 1226 and apply it at line 1356.

Revision history for this message
Victor Martinez (victored) wrote :

Jim,

Here is how we attacked the problem in Granite.

Our Source List widget does not use GtkTreeView's built-in expander and indentation system. I can confirm that the spacing issues are a problem in GtkTreeView, which doesn't make it the ideal base widget for building sidebars, but I guess we have no choice.

What I did to solve the problem in Granite's SourceList was packing multible invisible cell renderers at the beginning of the TreeViewColumn and making them visible or invisible depending on whether we want them to add padding or not; this is basically our indentation system. Since this implied disabling GtkTreeView's built-in expanders, I also had to write an expander cell renderer and pack the expander cells manually into the TreeViewColumn.

I am somewhat familiar with the codebase of your Sidebar widget, so I could add this feature if you think that the solution is not too hacky for Yorba's taste.

The relevant parts of our code are:

1. LEVEL-INDENTATION REPLACEMENT:

1.1 Invisible cell renderer that only adds space: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1124

1.2 Spacing properties: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1215

1.3 Deactivate built-in expanders and indentation: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1253

1.4 Putting the first stone in: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1318

1.5 Code that controls what spacers become visible: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1805

2. EXPANDER SYSTEM:

2.1 Packing the expanders: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1262

2.2 Expander visibility controller: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1896

2.3 Hacky button-press-event handler that captures clicks on the expanders and avoids selecting the cells if that's the case: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/SourceList.vala#L1612

2.4 Expander renderer: http://bazaar.launchpad.net/~elementary-pantheon/granite/granite/view/head:/lib/Widgets/CellRendererExpander.vala

I hope this information is helpful.

Revision history for this message
Jim Nelson (yorba-jim) wrote :

I've ticketed this upstream on our Redmine server: http://redmine.yorba.org/issues/7383

Victor, I appreciate the offer. I have a sense that it would require a _lot_ of work. Unfortunately, the sidebar code in Geary and Shotwell are based on the same code base, but they're not shared in a reusable way. Something else to consider going forward.

If you want, I'd be happy to consider a patch. How much code do you think it would take?

Revision history for this message
Jim Nelson (yorba-jim) wrote :

The Shotwell bug ticket is at http://redmine.yorba.org/issues/7384

Changed in shotwell:
status: New → Confirmed
Changed in egtk:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.