Commit Graph

13 Commits

Author SHA1 Message Date
Timm Bäder
56a58655fe Remove unnecessary gtk_widget_show calls 2017-01-22 14:38:21 +01:00
Christian Hergert
a68915abd1 shortcuts: the accelerator should always be LTR
Even on RTL languages, we want the shortcut to be LTR so that we always
have <control> to the left of the accel keyval.

https://bugzilla.gnome.org/show_bug.cgi?id=772695
2016-10-10 13:56:48 -07:00
Georges Basile Stavracas Neto
ddee89f4a3 shortcut-label: add 'disabled-text' property
When there's no useful shortcut accelerator set,
GtkShortcutLabel doesn't show any useful information.

To work around that, add a new property to set the
text to be displayed when there's no accelerator
available.

https://bugzilla.gnome.org/show_bug.cgi?id=769205
2016-07-27 16:30:43 -03:00
Georges Basile Stavracas Neto
7543cd8ce4 shortcut-label: make it public
GtkShortcutLabel is a widget that displays a single
shortcut accelerator or gesture in the user interface,
and is currently used by the shortcuts window.

This widget, however, has public value as other applications
also may want to expose their own shortcuts. For instance,
it'll be useful for the Keyboard panel on Control Center and
the new shortcut editor in Pitivi, among others.

This patch exposes GtkShortcutLabel as a public widget,
and adds the necessary documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=769205
2016-07-27 16:30:31 -03:00
Matthias Clasen
1c6b878e09 shortcuts window: Fix handling of significant xml chars
We are using markup in the labels, so we need to escape things
like < and >.

https://bugzilla.gnome.org/show_bug.cgi?id=767795
2016-06-19 17:49:03 -04:00
Timm Bäder
6a97b2563b shortcutlabel: Use a label directly
We can everything we need without the frame around it now.
2016-01-14 16:02:12 +01:00
Matthias Clasen
03769e3830 shortcut label: Tweak modifier key rendering
The subscript was affecting the vertical alignment too much,
so tweak the rendering of the L/R markers to avoid that. Also,
mark these as translatable.
2015-12-04 13:22:26 -05:00
Matthias Clasen
8768c0b8ac shortcuts: Extend the accelerator syntax more
Cover cases like left+right control, and render them nicely.
The gtk3-demo builder shortcuts example shows the new
possibilities.
2015-12-04 10:56:48 -05:00
Matthias Clasen
705d371362 help overlay: Allow key sequences
Extend the syntax to allow sequences of keys or key combinations,
e.g. t+t or <ctl>c+<ctl>x.

https://bugzilla.gnome.org/show_bug.cgi?id=758051
2015-11-14 21:34:43 -05:00
Matthias Clasen
62ec4a2415 shortcuts label: Redo the keycap theming
Use a style class directly on the frame. This is easier to reuse.
2015-10-28 10:19:00 -04:00
Matthias Clasen
71b79f3329 shortcut: Improve formatting of ranges
Use a centered ellipsis, to make it look nicer.
2015-10-23 07:46:31 -04:00
Matthias Clasen
67a54bf4ef shortcuts: Support ranges in the display of shortcuts
Repeating Alt-1 to Alt-9 as individual shortcuts looks really boring,
so allow compressing such ranges by specifying <Alt>1...9.
2015-10-22 14:32:50 -04:00
Matthias Clasen
1dfbae1aa4 Add GtkShortcutsWindow
This is a toplevel window that is tailored towards showing
help for shortcuts in an application. The implementation closely
follows this design: https://wiki.gnome.org/Design/OS/HelpOverlay

This implementation is inspired by earlier work in gnome-builder,
thanks to Christian Hergert.

https://bugzilla.gnome.org/show_bug.cgi?id=756428
2015-10-21 15:19:34 -04:00