event-popover: Rework UI and code
This builds on top of the existing UI/code, while adding a few improvements and behavioral changes: - The popover displays the changes-prevent icon when the even is read-only. - Each section is properly separated with `GtkSeparator`s, with equal amount of top and bottom margins. - Location and Meetings section are mutually exclusive; only one is shown. - When an event has no event note, the popover will always display that there's no description. - `GcalMeetingRow` has been ported to `GtkListBoxRow`. - The action button adapts its icon and tooltip text depending on the event permission.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
d1c0aa8245
commit
00cf2a735d
+45
-14
@@ -1,22 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GcalMeetingRow" parent="AdwActionRow">
|
||||
<template class="GcalMeetingRow" parent="GtkListBoxRow">
|
||||
<property name="activatable">False</property>
|
||||
<property name="focusable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="halign">start</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold" />
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="subtitle">
|
||||
<property name="halign">start</property>
|
||||
<property name="single-line-mode">True</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="max-width-chars">25</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkButton" id="join_button">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="use-underline">True</property>
|
||||
<!-- Translators: "Join" as in "Join meeting" -->
|
||||
<property name="label" translatable="yes">_Join</property>
|
||||
<style>
|
||||
<class name="suggested-action" />
|
||||
</style>
|
||||
<signal name="clicked" handler="on_join_button_clicked_cb" object="GcalMeetingRow" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkButton" id="join_button">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<!-- Translators: "Join" as in "Join meeting" -->
|
||||
<property name="label" translatable="yes">Join</property>
|
||||
<style>
|
||||
<class name="suggested-action" />
|
||||
</style>
|
||||
<signal name="clicked" handler="on_join_button_clicked_cb" object="GcalMeetingRow" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
|
||||
</template>
|
||||
</interface>
|
||||
|
||||
Reference in New Issue
Block a user