It's slightly more performant than a GtkLabel, which is demonstrably the widget dominating the perf profile of the app. Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1125
116 lines
4.5 KiB
XML
116 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="GcalEventWidget" parent="GtkWidget">
|
|
<property name="overflow">hidden</property>
|
|
|
|
<!-- Drag Source -->
|
|
<child>
|
|
<object class="GtkDragSource" id="drag_source">
|
|
<signal name="prepare" handler="on_drag_source_prepare_cb" object="GcalEventWidget" swapped="no" />
|
|
<signal name="begin" handler="on_drag_source_begin_cb" object="GcalEventWidget" swapped="no" />
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Click Gesture -->
|
|
<child>
|
|
<object class="GtkGestureClick">
|
|
<property name="button">1</property>
|
|
<signal name="pressed" handler="on_click_gesture_pressed_cb" object="GcalEventWidget" swapped="no" />
|
|
<signal name="released" handler="on_click_gesture_release_cb" object="GcalEventWidget" swapped="no" />
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkBox" id="main_widget">
|
|
<property name="hexpand">False</property>
|
|
<child>
|
|
<object class="AdwBin" id="edge">
|
|
<style>
|
|
<class name="edge" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Overflow Bin -->
|
|
<child>
|
|
<object class="GcalOverflowBin">
|
|
<property name="hexpand">True</property>
|
|
<property name="request-mode">width-for-height</property>
|
|
<style>
|
|
<class name="content" />
|
|
</style>
|
|
|
|
<!-- Main Stack -->
|
|
<child>
|
|
<object class="AdwSqueezer" id="squeezer">
|
|
<property name="hexpand">False</property>
|
|
<property name="homogeneous">False</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Vertical page -->
|
|
<child>
|
|
<object class="GtkBox" id="vertical_box">
|
|
<binding name="visible">
|
|
<closure type="gboolean" function="get_vertical_enabled">
|
|
<lookup name="event">GcalEventWidget</lookup>
|
|
<lookup name="orientation">GcalEventWidget</lookup>
|
|
</closure>
|
|
</binding>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<object class="GcalOverflowBin">
|
|
<property name="request-mode">width-for-height</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" bind-source="timestamp_label" bind-property="label" bind-flags="default" />
|
|
<property name="xalign">0.0</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkInscription">
|
|
<property name="text" bind-source="summary_inscription" bind-property="text" bind-flags="default" />
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="xalign">0.0</property>
|
|
<property name="min-lines">1</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Horizontal page -->
|
|
<child>
|
|
<object class="GtkBox" id="horizontal_box">
|
|
<property name="spacing">4</property>
|
|
<child>
|
|
<object class="GtkInscription" id="summary_inscription">
|
|
<property name="hexpand">True</property>
|
|
<property name="xalign">0.0</property>
|
|
<property name="min-lines">1</property>
|
|
<property name="text-overflow">ellipsize-end</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel" id="timestamp_label">
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|