After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750396 - make text selection widgets feel more interactive
make text selection widgets feel more interactive
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-06-04 13:10 UTC by Jakub Steiner
Modified: 2015-06-09 19:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adwaita: updates style for text selection (219.86 KB, patch)
2015-06-04 17:38 UTC, Jakub Steiner
committed Details | Review
texthandle: Allow setting individual states, and separately to handles (2.58 KB, patch)
2015-06-04 17:51 UTC, Carlos Garnacho
committed Details | Review
texthandle: Set prelight state on the pointer-interacted handle (1.71 KB, patch)
2015-06-04 17:51 UTC, Carlos Garnacho
committed Details | Review
adwaita: style tweaks to touch selections (111.48 KB, patch)
2015-06-09 13:05 UTC, Jakub Steiner
committed Details | Review

Description Jakub Steiner 2015-06-04 13:10:18 UTC
During the london hackfest we identified the helper widgets for altering text selection on touch (and pointer input too) to be too flat and not very interaction-friendly. Also the current symbolic icons used for the widgets don't align properly.

We need specific assets with clear :active and :hover states.
Comment 1 Jakub Steiner 2015-06-04 17:38:20 UTC
Created attachment 304601 [details] [review]
Adwaita: updates style for text selection

- use consistent widget style. unfortunately using assets
- light/dark variant
- new assets for text selestions, using existing slider asset for
  insertion point
Comment 2 Jakub Steiner 2015-06-04 17:40:58 UTC
The above patch has a number of issues. The text selection widgets don't have a correct anchor point. Would have to be bottom right for the top end, top left for the bottom end. Also it would have to deal with the flipped state for RTL languages.

In addition the widgets are linked (:active state on both at the same time) and :hover state is missing (we want to use it for pointer input).
Comment 3 Carlos Garnacho 2015-06-04 17:51:43 UTC
Created attachment 304603 [details] [review]
texthandle: Allow setting individual states, and separately to handles

Now each handle gets its individual current state, and we can accumulate
more than one state on these.
Comment 4 Carlos Garnacho 2015-06-04 17:51:49 UTC
Created attachment 304604 [details] [review]
texthandle: Set prelight state on the pointer-interacted handle

This will be useful with the theming changes to come.
Comment 5 Matthias Clasen 2015-06-05 02:41:13 UTC
With these patches, I don't get handles for extended selection. Instead, I see

(lt-gtk3-widget-factory:28317): Gtk-WARNING **: drawing failure for widget `GtkApplicationWindow': invalid matrix (not invertible)


The handles are lovely, though
Comment 6 Carlos Garnacho 2015-06-05 11:07:10 UTC
(In reply to Matthias Clasen from comment #5)
> With these patches, I don't get handles for extended selection. Instead, I
> see
> 
> (lt-gtk3-widget-factory:28317): Gtk-WARNING **: drawing failure for widget
> `GtkApplicationWindow': invalid matrix (not invertible)

I got this working after deleting gtk/gtk.gresource.xml and running make again.
Comment 7 Jakub Steiner 2015-06-05 11:13:21 UTC
For some reason things from ./gtk/gtk.gresource.xml got lost, thus the new image resources are missing form the patch. Is this file supposed to be edited by hand or is something else generating it?
Comment 8 Carlos Garnacho 2015-06-05 11:35:40 UTC
https://git.gnome.org/browse/gtk+/tree/gtk/Makefile.am#n1134 , it just doesn't regenerate on changes in the relevant subfolders. It might be worth to add a "gresource" target, so "make gresource" redoes it from scratch.
Comment 9 Matthias Clasen 2015-06-05 13:01:54 UTC
Ah right, regenerating the xml did the trick.
Comment 10 Matthias Clasen 2015-06-06 21:33:02 UTC
Pushed by accident, but I guess thats ok - we just need to fix the few remaining issues.
Comment 11 Matthias Clasen 2015-06-09 03:51:47 UTC
Review of attachment 304601 [details] [review]:

.
Comment 12 Matthias Clasen 2015-06-09 03:52:00 UTC
Review of attachment 304603 [details] [review]:

.
Comment 13 Matthias Clasen 2015-06-09 03:52:12 UTC
Review of attachment 304604 [details] [review]:

.
Comment 14 Jakub Steiner 2015-06-09 13:05:35 UTC
Created attachment 304857 [details] [review]
adwaita: style tweaks to touch selections

- use dark theme assets for the checkboxes and radios
- darken the popover for legibility (white bg/black text is
  really the most problematic background to have).

unfortunatley in terms of SCSS structure this is further digging us into the
hole of specificity. It would be much nicer to set the .osd class on the popover
and have everything just work. I'm sure we'll end up using OSD styled popovers
outside the touch context.
Comment 15 Matthias Clasen 2015-06-09 19:35:53 UTC
Sure, we can try that - as I said on irc, there is some breakage wrt to buttons being auto-linked that you need to debug if you want that.
Comment 16 Matthias Clasen 2015-06-09 19:51:38 UTC
Attachment 304857 [details] pushed as ac798dc - adwaita: style tweaks to touch selections