diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css index 304fdec8..52f41216 100644 --- a/data/theme/gtk-styles.css +++ b/data/theme/gtk-styles.css @@ -265,3 +265,24 @@ event-widget.color-light:backdrop { .calendar-list > list { border-radius: 4px; } + +/* Edit dialog's header button */ +button.sources-button { + border: none; + background: transparent; + box-shadow: none; + padding-bottom: 0; + padding-top: 0; +} + +button.sources-button:hover { + background: @theme_bg_color; + border-bottom: solid 2px @theme_selected_bg_color; + box-shadow: none; +} + +button.sources-button:checked { + background: @theme_bg_color; + border-bottom: solid 2px @theme_selected_bg_color; + box-shadow: none; +} diff --git a/data/ui/edit-dialog.ui b/data/ui/edit-dialog.ui index 4d593740..c7232370 100644 --- a/data/ui/edit-dialog.ui +++ b/data/ui/edit-dialog.ui @@ -15,7 +15,6 @@ True - Cancel @@ -31,6 +30,66 @@ 1 + + + True + True + True + sources_popover + + + + True + False + 6 + + + True + False + start + + + + + True + False + vertical + + + True + False + + + + + + + True + False + + + + + + + + True + False + start + pan-down-symbolic + + + + + + Done @@ -162,24 +221,6 @@ 2 - - - True - True - start - sources_popover - - - True - start - - - - - 3 - 0 - - True @@ -471,4 +512,20 @@ + + vertical + + + + + + + + vertical + + + + + + diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c index 5c7b2274..186e5b48 100644 --- a/src/gcal-edit-dialog.c +++ b/src/gcal-edit-dialog.c @@ -34,7 +34,11 @@ struct _GcalEditDialog GcalManager *manager; + /* titlebar */ GtkWidget *titlebar; + GtkWidget *title_label; + GtkWidget *subtitle_label; + GtkWidget *lock; GtkWidget *source_image; GtkWidget *source_label; @@ -413,6 +417,8 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass) gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, notes_text); gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, all_day_check); gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, titlebar); + gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, title_label); + gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, subtitle_label); gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, lock); gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, source_image); gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, sources_popover); @@ -1010,8 +1016,7 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog, gtk_image_set_from_pixbuf (GTK_IMAGE (dialog->source_image), pix); g_object_unref (pix); - gtk_header_bar_set_subtitle (GTK_HEADER_BAR (dialog->titlebar), - e_source_get_display_name (source)); + gtk_label_set_label (GTK_LABEL (dialog->subtitle_label), e_source_get_display_name (source)); /* retrieve start and end dates */ date_start = gcal_event_get_date_start (event);