month-view: introduce new overflow popover window

This ~almost~ implements a perfectly semantic transition (which
is kinda impossible now).
This commit is contained in:
Georges Basile Stavracas Neto
2017-11-15 02:03:26 -02:00
parent 8d6785b6f7
commit eff50668d4
9 changed files with 1064 additions and 165 deletions
+1
View File
@@ -8,6 +8,7 @@
<file alias="edit-dialog.ui" compressed="true" preprocess="xml-stripblanks">ui/edit-dialog.ui</file>
<file alias="event-widget.ui" compressed="true" preprocess="xml-stripblanks">ui/event-widget.ui</file>
<file alias="month-cell.ui" compressed="true" preprocess="xml-stripblanks">ui/month-cell.ui</file>
<file alias="month-popover.ui" compressed="true" preprocess="xml-stripblanks">ui/month-popover.ui</file>
<file alias="month-view.ui" compressed="true" preprocess="xml-stripblanks">ui/month-view.ui</file>
<file alias="multi-choice.ui" compressed="true" preprocess="xml-stripblanks">ui/multi-choice.ui</file>
<file alias="online-account-row.ui" compressed="true" preprocess="xml-stripblanks">ui/online-account-row.ui</file>
+1
View File
@@ -55,6 +55,7 @@ resource_data = files(
'ui/help-overlay.ui',
'ui/menus.ui',
'ui/month-cell.ui',
'ui/month-popover.ui',
'ui/month-view.ui',
'ui/multi-choice.ui',
'ui/quick-add-popover.ui',
+14
View File
@@ -465,3 +465,17 @@ monthcell button {
border-bottom: none;
border-right: none;
}
/*
* Month popover
*/
monthpopover { background: transparent; }
monthpopover > box {
margin: 4px;
border: 1px solid @borders;
box-shadow: 0px 0px 2px @wm_shadow;
padding: 12px;
background: @theme_bg_color;
}
+99
View File
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalMonthPopover" parent="GtkWindow">
<property name="modal">false</property>
<property name="opacity">0.0</property>
<property name="destroy-with-parent">true</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<!-- Day label & close button-->
<child>
<object class="GtkBox">
<property name="visible">true</property>
<child>
<object class="GtkLabel" id="day_label">
<property name="visible">true</property>
<property name="label">12</property>
<property name="xalign">0.0</property>
<property name="hexpand">true</property>
<attributes>
<attribute name="scale" value="2.25" />
</attributes>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">true</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="relief">none</property>
<signal name="clicked" handler="close_button_clicked_cb" object="GcalMonthPopover" swapped="yes" />
<child>
<object class="GtkImage">
<property name="visible">true</property>
<property name="icon-name">window-close-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- Event list revealer -->
<child>
<object class="GtkRevealer" id="revealer">
<property name="reveal-child">false</property>
<property name="transition-duration">200</property>
<property name="transition-type">slide-down</property>
<property name="visible">true</property>
<child>
<object class="GtkBox" id="top_box">
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
<object class="DzlElasticBin" id="elastic">
<property name="visible">true</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-height">true</property>
<property name="visible">true</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="visible">true</property>
<property name="selection-mode">none</property>
<style>
<class name="background" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- New Event button -->
<child>
<object class="GtkButton" id="new_event_button">
<property name="visible">true</property>
<property name="relief">none</property>
<property name="label" translatable="yes">New Event…</property>
<signal name="clicked" handler="new_event_button_clicked_cb" object="GcalMonthPopover" />
</object>
</child>
</object>
</child>
</template>
</interface>
-61
View File
@@ -142,65 +142,4 @@
</object>
</child>
</template>
<!-- Overflow popover -->
<object class="GtkPopover" id="overflow_popover">
<property name="can-focus">false</property>
<property name="position">bottom</property>
<signal name="drag-motion" handler="cancel_dnd_from_overflow_popover" object="GcalMonthView" swapped="no" />
<style>
<class name="events" />
</style>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="can-focus">false</property>
<property name="spacing">6</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="popover_title">
<property name="visible">true</property>
<property name="can-focus">false</property>
<property name="margin-top">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="xalign">0.0</property>
<style>
<class name="sidebar-header" />
</style>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">true</property>
<property name="can-focus">false</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">automatic</property>
<property name="max-content-height">400</property>
<property name="propagate-natural-height">true</property>
<child>
<object class="GtkBox" id="events_box">
<property name="visible">true</property>
<property name="orientation">vertical</property>
<property name="margin-start">2</property>
<property name="margin-end">2</property>
<property name="spacing">2</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">true</property>
<property name="hexpand">true</property>
<property name="label" translatable="yes">Add Event…</property>
<signal name="clicked" handler="add_new_event_button_cb" object="GcalMonthView" swapped="no" />
</object>
</child>
</object>
</child>
</object>
</interface>