Commit Graph
13 Commits
Author SHA1 Message Date
Hari Rana f7c4f7b25a views/month-view-row: Calculate spacings in code
Visually, this comes with the benefit of not having the first
and last visible event widgets take additional margins, as spacing
is only applied between event widgets.

This will also allow us to make use of gtk_widget_pick() without
having to rely on hardcoding 1 on the y axis.

The current approach has a one pixel margin at the top and bottom
of each event widget, which offsets the vertical position of
every event widget by one pixel. In order to pick the first
event widget, we'd want to call
gcal_month_cell_get_header_height() because this is where the
first event widget is placed. If we were to invoke
gtk_widget_pick() with (x, 0), where x is
half the width of the month cell, the returned value would be
NULL because gtk_widget_pick() does not account for margins,
so it would need to be (x, 1), with 1 hardcoded.

Since this patch removes that offset, we can simply use
(x, 0) without having to hardcode 1.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:39:33 -04:00
Hari Rana 1637997bd6 views/week-grid: Add margins to event widgets
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:37:28 -04:00
Hari Rana 256524ff4c events: Remove margin
In the next commits, gaps will be added onto appropriate widgets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:34:29 -04:00
Hari Rana 19879c6c02 style: Decrease event widget's outline offset
Having an offset would hide the overflowing pixels.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/598>
2026-03-01 19:35:45 +00:00
Philipp Sauberzweig 4a3982848a css: Use larger fraction of event-bg-color for event widget background color.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/643>
2025-10-06 18:47:32 +00:00
Philipp Sauberzweig f78a2f33ed css: Use standard view-fg-color instead of tinted color for event widget label
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/643>
2025-10-06 18:47:32 +00:00
Philipp Sauberzweig cec8a66e88 gui/event-widget: Update event widget style
This significantly changes the border radius of event widgets, as
well as their edge, background, and foreground colors.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1433
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/621>
2025-08-01 18:25:48 -04:00
Hari Rana 02a7b13043 gui/event-widget: Add focus ring 2025-04-30 21:44:46 -03:00
Hari Rana 9281b1b964 css: Use CSS variables for linear gradients 2025-04-19 15:49:02 -04:00
Hari Rana 5cd917f0ed css: Consistently indent CSS 2025-04-18 23:30:37 -04:00
Hari Rana 53bb697812 css: Port to custom properties 2025-04-18 23:29:17 -04:00
Georges Basile Stavracas Neto 2c3eceaa48 style: Use CSS variable for event radius 2024-11-06 10:40:32 -03:00
Georges Basile Stavracas Neto de5f663373 style: Use CSS variables for event widget styling
This vastly simplifies the code!
2024-06-11 17:22:35 -03:00