edit-dialog: fix Reminders dim label size
This commit is contained in:
@@ -64,6 +64,7 @@
|
|||||||
<property name="halign">end</property>
|
<property name="halign">end</property>
|
||||||
<property name="label" translatable="yes">Title</property>
|
<property name="label" translatable="yes">Title</property>
|
||||||
<property name="ellipsize">end</property>
|
<property name="ellipsize">end</property>
|
||||||
|
<signal name="size-allocate" handler="fix_reminders_label_height_cb" object="reminders_label" swapped="no" after="yes" />
|
||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
@@ -102,9 +103,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel" id="reminders_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="halign">end</property>
|
<property name="halign">end</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
<property name="label" translatable="yes">Reminders</property>
|
<property name="label" translatable="yes">Reminders</property>
|
||||||
<property name="ellipsize">end</property>
|
<property name="ellipsize">end</property>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -271,6 +271,14 @@ sort_alarms_func (GtkListBoxRow *a,
|
|||||||
return minutes_a - minutes_b;
|
return minutes_a - minutes_b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fix_reminders_label_height_cb (GtkWidget *summary_label,
|
||||||
|
GdkRectangle *allocation,
|
||||||
|
GtkWidget *reminders_label)
|
||||||
|
{
|
||||||
|
gtk_widget_set_size_request (reminders_label, -1, allocation->height);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gcal_edit_dialog_get_property (GObject *object,
|
gcal_edit_dialog_get_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@@ -411,6 +419,7 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass)
|
|||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
gtk_widget_class_bind_template_callback (widget_class, add_alarm_button_clicked);
|
gtk_widget_class_bind_template_callback (widget_class, add_alarm_button_clicked);
|
||||||
|
gtk_widget_class_bind_template_callback (widget_class, fix_reminders_label_height_cb);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, gcal_edit_dialog_action_button_clicked);
|
gtk_widget_class_bind_template_callback (widget_class, gcal_edit_dialog_action_button_clicked);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, gcal_edit_dialog_all_day_changed);
|
gtk_widget_class_bind_template_callback (widget_class, gcal_edit_dialog_all_day_changed);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, update_summary);
|
gtk_widget_class_bind_template_callback (widget_class, update_summary);
|
||||||
@@ -656,6 +665,13 @@ remove_button_clicked (GtkButton *button,
|
|||||||
gcal_manager_update_event (self->manager, event);
|
gcal_manager_update_event (self->manager, event);
|
||||||
|
|
||||||
gtk_widget_destroy (row);
|
gtk_widget_destroy (row);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In order to not allocate a spacing between the listbox and the
|
||||||
|
* add alarms button, we should always keep the listbox:visible property
|
||||||
|
* updated.
|
||||||
|
*/
|
||||||
|
gtk_widget_set_visible (self->alarms_listbox, gcal_event_has_alarms (self->event));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user