event-widget: turn into a GtkBin subclass

The current GcalEventWidget implementation is a direct
GtkWidget subclass, which means we have to take care of
all the implementation details such as raising GdkWindows
and managing the drawing all by ourselves.

The event widget, however, can be easily described through
a GtkBuilder file. This would simplify the implementation
and makes us maintain less code.

Fix that by making GcalEventWidget a GtkBin subclass.
This commit is contained in:
Georges Basile Stavracas Neto
2017-09-14 13:26:28 -03:00
parent b3cfbe3d31
commit a853376629
8 changed files with 372 additions and 500 deletions
+11 -7
View File
@@ -212,28 +212,32 @@ popover.events button {
box-shadow: none;
}
event-widget {
/*
* Event widget
*/
event {
border-radius: 2px;
margin: 2px 2px 1px;
padding: 3px 4px;
margin: 1px 1px 0 2px;
font-size: 9pt;
}
event-widget.color-dark {
event.color-dark {
color: white;
outline-color: rgba(0, 0, 0, 0.3);
}
event-widget.color-dark:backdrop {
event.color-dark:backdrop {
color: rgba(255, 255, 255, 0.3);
}
event-widget.color-light {
event.color-light {
color: black;
outline-color: rgba(255, 255, 255, 0.5);
}
event-widget.color-light:backdrop {
event.color-light:backdrop {
color: rgba(0, 0, 0, 0.3);
}