Week Header

Today, I would like to introduce to you all, the all new week-header πŸ˜€

The week-header is the first half of the week-view which deals with events last greater than or equal to 24h. Basically, events that last for a whole day or multiple days.

First, the events are fetched and stored in a GList. This GList is sorted according to the following criteria’s

  • Multiday events should be placed before all-day events
  • In case of both events being similar events:
    • They are sorted according to the start day first
    • They are sorted according to the end day in case of aΒ tie.

For placing the events themselves, we iterate from the first row and find a perfect fit for the event at hand and add it there. The result- A very neat placement of events. The whole process is like sand flowing inside a jar of golf balls and occupying where it can.


If you noticed, this hides certain events and only shows 3 rows of events. If you further notice, you will see a button at the bottom left. Let’s click it and this happens:


The header also has a feature of expand/collapse which shows/hides events πŸ™‚

The expand mode shows all the events and also introduces a scrollable window to see events further below the current events.
The collapse mode shows only three rows of events and shows label placeholders if there are any events hidden.

Hope you all liked it. πŸ™‚

Let me also remind you that the countdown has begun for this :


One month to go πŸ˜€