Commit graph

6 commits

Author SHA1 Message Date
Michael Gratton
f4d3c54110 ui: Remove can_focus from GTK builder file definitions
GTK widgets set the default for this as needed, and some incorrect
values for this have caused issues with keyboard focus.

Fixes #1059
2021-01-27 21:43:23 +11:00
James Westman
adf6f2b4a7 composer: Improve "insert link" popover
- Use transitions instead of show/hide
- Make the popover narrower (360px instead of 40 chars)
- Use text labels for "Add" and "Insert" rather than the check icon
- Show the button as active when the popover is open
2020-02-15 23:01:25 -06:00
James Westman
d5a5afcc78 composer: More tweaks to match mockups
- Move the attachment button(s) out of the headerbar into the action bar
- Add a cancel button
- Adjust some margins
- Set popover positions to top
- Remove subject from headerbar title to save horizontal space
2020-01-21 19:43:37 -06:00
Niels De Graef
f283630569 Use https:// by default for links
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-20 16:06:40 +11:00
Michael James Gratton
8bf68bd345 ComposerLinkPopover UI polish.
* src/client/composer/composer-link-popover.vala
  (ComposerLinkPopover::show): Focus URL entry on being shown.

* ui/composer-link-popover.ui: Replace URL entry text label with an
  accessibility name. Refine the tooltip for the insert button, add notes
  to translators about it.
2017-02-01 00:41:45 +11:00
Michael James Gratton
c476fdc6d1 Replace composer link dialog with a popover.
* src/client/composer/composer-link-popover.vala: New GtkPopover subclass
  for creating/editing links.

* src/client/composer/composer-web-view.vala (EditContext): Add is_link
  and link_uri properties, decode them from the message string, add
  decoding tests.
  (ComposerWebView): Add some as-yet un-implemented methods for
  inserting/deleting links.

* src/client/composer/composer-widget.vala (ComposerWidget): Add
  cursor_url for storing current text cursor link, update it from the
  cursor_context_changed signal param, rename hover_url to pointer_url to
  match. Add link_activated signal to let user's open links they are
  adding, hook that up in the controller. Rename
  ::update_selection_actions to ::update_cursor_actions, since that's a
  little more apt now, also enable insert link action if there is a
  cursor_url set as well as a selection. Remove ::link_dialog, replace
  with ::new_link_popover, hook up the new popover's signals there as
  appropriate.
  (ComposerWidget::on_insert_link): Create and show a lin popover instead
  of a dialog.

* ui/composer-web-view.js: Take note of whther the context node is a link
  and if so, also it's href. Include both when serialsing for the
  cursorContextChanged message. Add serialisation tests.

* ui/composer-link-popover.ui: New UI for link popover.
2017-02-01 00:41:44 +11:00