Splitter hovering area too large

Bug #1647292 reported by Massimo on 2016-12-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Undecided
Unassigned

Bug Description

This is gtk3 development version from bzr.
1.90

In vertical right splits it is not possible to mark the first character of a word as the hovering area of the splitter is so large, that it turns into a resize pointer when trying to mark the first character of a word.
This was different on the gtk2 branch.

Related branches

Stephen Boddy (stephen-j-boddy) wrote :

I think this is down to your theme. It is not something we set, and I can easily select the first character using the Ubuntu Ambiance theme. What are you using, and have you tried some other themes?

Changed in terminator:
status: New → Incomplete
Egmont Koblinger (egmont-gmail) wrote :

I guess (and this is really just a guess) that it's GTK+'s workaround against narrow handles, and if you have a wider handle then it no longer extends its click area beyond its visible bits.

Could you try the patch from bug 1522575 and then a giant separator size?

Massimo (massimo-b) wrote :

I don't think it's about the theme. Moreover I did not change it. Could be that the new Gtk3 port of terminator using a different Gtk3 theme is the issue.
Currently I have MurrinaNeoGraphite which is a Gtk2 only theme. The whole Gtk theming is a huge mess. Gtk2 and 3 are different and usually need themes that support both. Some recent updates of Gtk3 (I think that was 3.20) was making most themes incompatible and unusable on the distributions... ok different subject..

I tried different themes. I tried different mouse pointer themes and sizes.

I have a separator size of 1. Changing that doesn't do anything, also on new windows. Maybe I need to restart the whole global terminator process with DBus session?

Look at the screenshot...

Stephen Boddy (stephen-j-boddy) wrote :

1.90 is the gtk3 release of Terminator, and *only* uses gtk3 theming. The gtk2 theme has zero effect on 1.90. It only affects the gtk2 Terminator (i.e. 0.98/1.0) release. So you not changing the gtk2 theme doesn't matter, because the gtk2 and gtk3 themes do not share anything. The best you can hope for is a theme that provides for both gtk2 and gtk3 and makes them as consistent as possible with each other given their respective restrictions. This is the kind of thing dsitros like Ubuntu do, with their Ambiance/Radiance themes. The way to test for certain is to find another gtk3 program that uses splitters, and to test it there too.

Simplest is to check gtk3-demo and select "Paned Widgets" on the left, then Run at the top. There is one of each orientation. See if the handles hover area is oversized there too. Although this is not definitive, as that would depend on the other program letting you modify splitter handle width on the fly too :-) Increasing/decreasing the separator size should be a global dynamic change during runtime, as soon as you close the Preferences window.

Stephen Boddy (stephen-j-boddy) wrote :

Oh, it might also help if you told us which gtk3 theme you have configured.

Massimo (massimo-b) wrote :

Right, I wasn't sure where to set and lookup the Gtk3 theme as I never changed that. I've only set the "Style" in Xfce->Appearance.
However looking at this I have Adwaita enabled:

$ cat ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-font-name=Sans Serif 9
gtk-theme-name=Adwaita
gtk-icon-theme-name=Adwaita
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

Stephen Boddy (stephen-j-boddy) wrote :

Ah-HA! It's your theme. It took me a while to install/find/activate Adwaita, but when I did, I see your issue. If you look here:
https://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.css#n4205
You will see that Adwaita is plugging in an 8px padding/margin that is always applied. Even if the separator is 20 px wide. I also checked gtk3-demo and the Paned demo also shows this issue, so it is not just a Terminator thing. It looks like Adwaita sets the handle size to 1 px, then uses this padding/margin to make it easier to grab, pretty much like Egmont hypothesized. Only problem is they are assuming there is always an 8 px padding (which I think is one of the gnome "standards") so no widgets are masked by this invisible handle.

I have no idea if this is even considered a bug (who knows with the gnome devs!) We could in theory start overriding the CSS, but I'm not sure I'm keen to go making fixes in Terminator to accommodate what looks like a broken theme.

Stephen Boddy (stephen-j-boddy) wrote :

Or rather, like Egmont hypothesized minus the bit about it not happening if the handle is wider.

Changed in terminator:
status: Incomplete → Opinion
Stephen Boddy (stephen-j-boddy) wrote :

You can test the following "hack", Massimo:
Run terminator using the following:

GTK_DEBUG=interactive terminator

In the CSS tab (at the top) You can insert the following CSS snippet:

GtkPaned {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
}

You should find that that annoying hover issue goes away temporarily, and you can now select characters next to the splitter handle.

I'm seeing that the GTK3/CSS is causing a number of pain points that mean a thorough good revision is needed anyway, so perhaps this can be rolled into that.

OK, So you can take a look at branch: https://code.launchpad.net/~stephen-j-boddy/terminator/gtk3-fix-transparency
Which has work related to https://bugs.launchpad.net/terminator/+bug/1599453
It also has a fix for this issue. I accidentally made the behaviour tied in with the setting of the separator size. So if size is -1 (default to theme value) you get the existing Adwaita behaviour with the extended hover area. Set it to 0+ and the extended hover area is removed. I actually meant to remove it full stop, but perhaps this is a lucky fluke? Would anyone ever want the extra grabbable area?

Massimo (massimo-b) wrote :

Ok, this is a different branch? Will those be integrated to the gtk3 branch and later also to trunk which is left on gtk2 currently?

Yes it's a different branch making CSS styling more flexible generally, and attempting to fix a number of transparency issues. Unfortunately the fixes seem to be very theme dependent. i.e. by fixing Ambient tab header background, Adwaita tab backgrounds become transparent. I think this is because they are defining colours with different names.

The current fix for *this* bug is just a two line addition though. I can push it up to gtk3 no problem, but the question mark is whether or not it should keep the ability to revert to the old Adwaita behaviour when sizing is set to -1. If we are going to completely eliminate the Adwaita behaviour then the fix needs to be in a slightly different place in the code.

As far as I can tell gtk2 does not have the same issue, and I'm not going to be doing much at all from now on with the gtk2 branch, focusing instead on gtk3. Certainly no major changes are going to go into gtk2 (as an example, someone is working on iTerm2 style tmux integration, which will only go into gtk3.)

Committed revision 1669.

Changed in terminator:
status: Opinion → Fix Committed
Massimo (massimo-b) wrote :

Ok, waiting to get the change in the gtk3 branch. I don't restart terminator often as I have many sessions opened permanently. With DBus I can't even start a separate instance to test bugfixes :)

Sure, there is no reason to maintain the old gtk2 branch.. good to know there are at least resources and efforts done to have some progress in terminator in general and towards Gtk3.

Changed in terminator:
milestone: none → 2.0
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers