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
This commit is contained in:
James Westman 2020-01-15 22:12:34 -06:00 committed by James Westman
parent 0eed1bb21a
commit d5a5afcc78
6 changed files with 104 additions and 92 deletions

View file

@ -5,6 +5,11 @@
<template class="ComposerHeaderbar" parent="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child type="title">
<object class="GtkBox">
<property name="visible">False</property>
</object>
</child>
<child>
<object class="GtkBox" id="detach_start">
<property name="visible">True</property>
@ -50,85 +55,12 @@
</object>
</child>
<child>
<object class="GtkButton" id="new_message_attach_button">
<object class="GtkButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Attach a file</property>
<property name="action_name">cmh.add-attachment</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="new_message_attach_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">mail-attachment-symbolic</property>
</object>
</child>
<property name="label">Cancel</property>
<property name="action_name">cmh.composer-close</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="conversation_attach_buttons">
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conversation_attach_new_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Attach a file</property>
<property name="action_name">cmh.add-attachment</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="conversation_attach_new_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">mail-attachment-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="conversation_attach_original_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Add original attachments</property>
<property name="action_name">cmh.add-original-attachments</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="conversation_attach_original_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">edit-copy-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="linked"/>
</style>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="recipients_button">

View file

@ -4,7 +4,7 @@
<requires lib="gtk+" version="3.14"/>
<template class="ComposerLinkPopover" parent="GtkPopover">
<property name="can_focus">False</property>
<property name="position">bottom</property>
<property name="position">top</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>

View file

@ -831,6 +831,7 @@
<property name="can_focus">True</property>
<property name="menu_model">font_menu</property>
<property name="tooltip_text" translatable="yes">Change font type</property>
<property name="direction">up</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -906,6 +907,7 @@
<property name="can_focus">True</property>
<property name="menu_model">font_size_menu</property>
<property name="tooltip_text" translatable="yes">Change font size</property>
<property name="direction">up</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -1054,6 +1056,87 @@
</style>
</object>
</child>
<child>
<object class="GtkButton" id="new_message_attach_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Attach a file</property>
<property name="action_name">win.add-attachment</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="new_message_attach_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">mail-attachment-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="conversation_attach_buttons">
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conversation_attach_new_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Attach a file</property>
<property name="action_name">win.add-attachment</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="conversation_attach_new_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">mail-attachment-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="conversation_attach_original_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Add original attachments</property>
<property name="action_name">win.add-original-attachments</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="conversation_attach_original_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">edit-copy-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="linked"/>
</style>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="center">
<object class="GtkLabel" id="info_label">
<property name="visible">True</property>
@ -1073,6 +1156,8 @@
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="menu_model">rich_text_menu</property>
<property name="tooltip_text" translatable="yes">Enable or disable rich text mode</property>
<property name="direction">up</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>