Hari Rana
78e87fad4b
gui/event-popover: Apply style to italicize
...
Using the italic attribute in the label property made the
attribute translatable, which is undesired.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1427
2025-08-02 15:20:36 -04:00
Hari Rana
d477ac2d72
event-editor/multi-choice: Focus widget if increment/decrement buttons are pressed
...
This also re-sets the state flags of the buttons, because otherwise
the increment/decrement buttons lose their hovered state after
the widget gains focus.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/616 >
2025-07-27 07:20:15 -04:00
Hari Rana
576c82b060
event-editor/multi-choice: Add focus ring around the entire widget
...
The current behavior of the widget makes it so keyboard focus
outlines the toggle button rather than the entire widget. In some
cases, the outline touches the edges of the label, which makes it
look cramped.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/616 >
2025-07-19 17:55:11 -04:00
Hari Rana
684ed71711
css: Rework month view's box shadows
...
This makes the box shadows permanent.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/604 >
2025-07-08 14:08:37 +00:00
Hari Rana
a0b530298a
views/month-view: Allocate more for grid height
...
This allocates two extra pixels for the grid's height to make
the cell borders hide below the footer.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/604 >
2025-07-08 14:08:37 +00:00
Hari Rana
110856ee1a
views/month-cell: Don't assert icon_tooltip_binding
...
The g_assert line would exit the program whenever we tried targeting
a month cell from the inspector.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/601 >
2025-07-05 18:06:05 -04:00
Hari Rana
8dd8538014
views/month-cell: Use GtkWidget APIs for retrieving margin
...
GtkStyleContext is deprecated.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/601 >
2025-07-05 18:05:07 -04:00
Hari Rana
11ac0e43e8
css: Use box shadow for month cells
...
This is probably a better approach for getting month separators,
because box shadows don't affect the layout, unlike borders. Since
GtkStyleContext is deprecated, it makes more sense to use properties
that don't have any side effects with physical size.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/601 >
2025-07-05 18:05:04 -04:00
Hari Rana
ba716102b9
common/date-chooser: Make arrow left/right move focus across grid
...
This also notifies the user when out of bound with arrow buttons.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/608 >
2025-07-05 21:07:50 +00:00
Hari Rana
032a71dde6
common/date-chooser: Skip calendar grid with tab
...
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/608 >
2025-07-05 21:07:50 +00:00
Hari Rana
a8db7b44a4
flatpak: Bump libical dependency
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/613 >
2025-07-04 10:22:45 -04:00
Hari Rana
1b51a5073f
build: Bump minimum libadwaita version to 1.8.alpha
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/611 >
2025-07-02 21:28:02 -04:00
Hari Rana
6e4fe88e58
gui: Port GtkShortcutsWindow to AdwShortcutsDialog
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/611 >
2025-07-02 20:50:31 -04:00
Hari Rana
6ab0ef7386
gui/event-widget: Set child depending on the orientation
...
Commit https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/73abcf19b0e70fb6fdd45394169b00e21ea0734a
introduced a bug where it uses the wrong widget on
vertical orientation.
This patch fixes that bug by using the correct widget
for their respective orientation. It also removes the use of
AdwClamp, as it was clamping labels above a certain height requested.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1414
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/607 >
2025-06-30 15:00:59 -04:00
Hari Rana
b368e1f674
views/agenda-view: Set accessible properties for list items
...
This is needed to have the screen reader read event information
out loud.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/606 >
2025-06-30 16:18:06 +00:00
Hari Rana
d809192dd5
common/date-chooser: Wrap months
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:46 -04:00
Hari Rana
7a40a3be6a
common/date-chooser: Add accessible labels to GcalMultiChoice widgets
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:27 -04:00
Hari Rana
7be43df099
event-editor/multi-choice: Always set focus-visible flag when focused
...
This is to ensure that the focus ring never disappears until
the toggle button is unfocused.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:24 -04:00
Hari Rana
b4853da249
event-editor/multi-choice: Add keyboard interaction
...
A significant portion of the behavior was guided by the
"Date Picker Spin Button Example" page in the
ARIA Authoring Practices Guide (APG):
https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/examples/datepicker-spinbuttons/
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:21 -04:00
Hari Rana
5628a5f311
event-editor/multi-choice: Make up/down buttons unfocusable
...
Spin buttons' increment/decrement buttons are standardly not made
to be accessible/focusable.
This copies the behavior from the GtkSpinButton widget.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:19 -04:00
Hari Rana
2a7a4e3b30
event-editor/multi-choice: Implement GtkAccessibleRange
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:17 -04:00
Hari Rana
70b9fde162
event-editor/multi-choice: Implement GtkAccessible
...
This is needed to have the toggle button communicate with the
screen reader to use the parent widget to retrieve accessible
information, rather than the toggle button itself.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:15 -04:00
Hari Rana
196f86b4f4
event-editor/multi-choice: Use g_assert in public methods
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:11 -04:00
Hari Rana
d1a8e072b2
event-editor/multi-choice: Add file name to header
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:09 -04:00
Hari Rana
5ca18c7a34
event-editor/multi-choice: Document public methods
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:51:07 -04:00
Hari Rana
a6015bd357
event-editor/multi-choice: Properly space out code
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:50:58 -04:00
Hari Rana
640308652b
event-editor/multi-choice: Comment code sections
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603 >
2025-06-29 08:50:41 -04:00
Hari Rana
4ec25d8775
reminders-section: Add focus ring
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/399 >
2025-06-29 01:03:00 +00:00
Hari Rana
f40ed5b90c
reminders-section: Modernize popover
...
This makes the alarms popover look much closer to the AdwComboRow widget.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/399 >
2025-06-29 01:03:00 +00:00
Hari Rana
40cbf66c1b
gui/calendar-list: Turn row into a checkbox
...
Using a GtkCheckButton widget as a child as we've been doing was a
little bit too much, considering it was overachieving its use case.
Given the nature of a button, the widget was also capable of
being targetable, focusable, and activatable, which forces
a keyboard user to tab an additional time to get to the
next row in the list.
This patch introduces a new method by turning the entire row into a
check button widget, with an image widget that becomes visible or
invisible, which addresses the issues raised above. This also
avoids binding properties bidirectionally, as the image is only
used for decorative purposes.
https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542#note_2459629
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/588 >
2025-06-28 20:27:28 +00:00
Hari Rana
2ee31847fa
gui/event-widget: Use default value
...
The default value for GtkGestureSingle:button is 1:
https://docs.gtk.org/gtk4/property.GestureSingle.button.html
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 14:01:11 -04:00
Hari Rana
73abcf19b0
gui/event-widget: Use AdwClamp
...
AdwSqueezer is deprecated.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 14:01:11 -04:00
Hari Rana
e8249e9e43
gui/event-widget: Update pressed state
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 14:01:08 -04:00
Hari Rana
96fef80ca2
gui/event-widget: Set has-popup accessible property to true
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 13:49:16 -04:00
Hari Rana
73e1baad04
gui/event-widget: Set accessible role as toggle button
...
Since it's a toggleable button with a popup, it makes more sense
to set its accessible role as GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 13:49:08 -04:00
Hari Rana
ff17056108
gui/event-widget: Use GtkBoxLayout
...
The GTK inspector would always target and inspect the `main_widget`
box rather than the parent widget, which became repetitive to keep
pressing the "Parent widget" button when working with accessibility,
as the parent widget contained the accessible properties and states.
GtkBoxLayout solves that by allowing us to get rid of the box
completely, which exclusively makes it inspect the widget we
actually want to target.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587 >
2025-06-28 13:48:59 -04:00
Hari Rana
6cd138974f
views/week-header: Port to gtk_widget_compute_point
...
`gtk_widget_translate_coordinates` is deprecated.
2025-05-21 01:21:38 -03:00
Hari Rana
2bfa881c2d
views/week-grid: Port to gtk_widget_compute_point
...
`gtk_widget_translate_coordinates` is deprecated.
2025-05-21 01:21:38 -03:00
Hari Rana
a25b129643
views/month: Disallow moving focus out of the view with arrow keys
2025-05-21 01:17:33 -03:00
Hari Rana
ed1db0bf72
views/month: Move out of the view when pressing tab
...
This makes it so the user can easily skip the entire month view
by pressing tab within the month view. This means, events can only
be accessed with arrow keys in the month view.
2025-05-21 01:14:17 -03:00
Hari Rana
1ab79d0cc8
views/month: Set all non-visible rows as unfocusable
...
When tabbing into the month view, the keyboard focus would go
to the first week row in the widget hierarchy, rather than the
visible row. Setting the `GtkWidget:can-focus` property to
FALSE on every non-visible row only allows keyboard focus
within the visible rows.
2025-05-21 01:13:38 -03:00
Hari Rana
8c02d0ce24
views/month: Use macros for first and last visible row indexes
2025-05-20 22:33:43 -04:00
Hari Rana
3d7197d3cd
gui/window: Set parent widget as last focus when event widget is unfocusable
...
When selecting an event with a pointer, the keyboard-focused widget
was being set instead of the last focus widget, which was
then refocused after the event popover closed.
This patch fixes that bug by only setting the parent widget as
the last focus widget if the event widget itself is unfocusable,
like in the agenda view. The `GtkWidget:focus-on-click` property
is already enabled, so it takes care of refocusing the event
widget if it's focusable.
Commit https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/a3fb57939a307f5b661cc2f205e562f43a0a31fa
technically fixed https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/915 ,
but this patch solidifies the commit.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/915
2025-05-05 12:05:41 -04:00
Hari Rana
02a7b13043
gui/event-widget: Add focus ring
2025-04-30 21:44:46 -03:00
Hari Rana
0aaf13626c
views/agenda: Only focus rows
...
This is to avoid selecting the event widget twice, while still
being able to use the GtkListBoxRow's features.
2025-04-30 21:43:43 -03:00
Hari Rana
a3fb57939a
gui/event-widget: Implement button features
...
This implements button functionality to make it able to focus
and activate it. This also sets the appropriate accessibility
role and labels/descriptions.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
2025-04-30 21:23:44 -03:00
Hari Rana
336ecd9ec3
css: Add focus ring custom properties
...
The values were mostly copied from libadwaita's, but with the
intention to easily add focus rings to custom widgets if desired.
2025-04-21 13:32:50 -04:00
Hari Rana
a09c02591e
event-editor/notes: Add height-request
...
The larger physical size of the text view helps convey that it's
a text box, and not a regular button or list box row.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1081
2025-04-21 13:32:49 -04:00
Hari Rana
445000b3cc
event-editor/notes: Add 'focused' CSS class when focused
...
This mimics what GtkEntryRow does, and allows for an always visible
focus ring when the notes text view has focus.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1081
2025-04-21 13:32:49 -04:00
Hari Rana
140dd3b145
event-editor/notes: Make it an AdwPreferencesRow
2025-04-21 13:32:45 -04:00
Hari Rana
9281b1b964
css: Use CSS variables for linear gradients
2025-04-19 15:49:02 -04:00
Hari Rana
155664b67c
css: Rewrite monthcell section
2025-04-19 10:40:26 -04:00
Hari Rana
5cd917f0ed
css: Consistently indent CSS
2025-04-18 23:30:37 -04:00
Hari Rana
aa343688cd
css: Adjust placements to avoid re-declaring properties
2025-04-18 23:29:24 -04:00
Hari Rana
c24c486130
css: Remove unnecessary declarations
2025-04-18 23:29:24 -04:00
Hari Rana
53bb697812
css: Port to custom properties
2025-04-18 23:29:17 -04:00
Hari Rana
4fb3a69313
month-popover: Add Escape trigger action
2024-12-16 18:14:11 -03:00
Hari Rana
8c8bea1cf0
month-popover: Add "popdown" action
2024-12-16 18:11:59 -03:00
Hari Rana
415903f584
month-popover: Grab focus to New Event button at popup
2024-12-16 18:07:04 -03:00
Hari Rana
a0ba5552fd
flatpak: Use local directory in gnome-calendar module
...
This is mainly beneficial for those who build flatpaks using
`flatpak-builder`, but it won't affect GNOME Builder users.
2024-11-16 08:15:41 -05:00
Hari Rana
1a5d9ca2b7
flatpak: Move Flatpak manifest path to build-aux
...
Most projects have the manifest at the root of the `build-aux`
directory, so let's just do that
2024-11-16 08:15:34 -05:00
Hari Rana
d7131d5141
import: Only list writable calendars
2024-08-23 13:46:00 -03:00
Hari Rana
26d34930b6
event-editor: Only list writable calendars
2024-08-23 13:46:00 -03:00
Hari Rana
8ff3a843b3
utils: Add function to create writable-only calendars lists
2024-08-23 13:46:00 -03:00
Hari Rana
00cf2a735d
event-popover: Rework UI and code
...
This builds on top of the existing UI/code, while adding a few improvements and
behavioral changes:
- The popover displays the changes-prevent icon when the even is read-only.
- Each section is properly separated with `GtkSeparator`s, with equal amount of
top and bottom margins.
- Location and Meetings section are mutually exclusive; only one is shown.
- When an event has no event note, the popover will always display that there's no
description.
- `GcalMeetingRow` has been ported to `GtkListBoxRow`.
- The action button adapts its icon and tooltip text depending on the event
permission.
2024-07-22 16:20:57 -06:00
Hari Rana
195c860d20
doap: Add new maintainer and developer
2024-07-17 10:32:47 -04:00
Hari Rana
0c8e1834f7
about, appdata: Port to AdwAboutDialog.new_from_appdata
...
This removes a lot of duplicated code, as we can simply reuse the
appdata file. It will also allow us to add release notes without
needing to rewrite them. A simple update in the
`adw_about_dialog_new_from_appdata` method will take care of
displaying the release notes.
This also renames the appdata file from `appdata.xml` to
`metainfo.xml`, as `appdata.xml` is considered a legacy filename.
2024-04-26 12:56:14 +00:00
Hari Rana
65bb78f11a
edit-calendar-page: Improve location row
...
This changes the tooltip text display area uniquely to the
subtitle label, and excludes HTML elements and attributes
from accessibility labels.
2024-04-26 12:41:47 +00:00
Hari Rana
991ad3385b
calendars-page: Remove Esc shortcut
...
AdwDialog already provides its own controller to close the window
with Esc.
2024-04-04 14:31:06 -04:00
Hari Rana
ddb54c8c1c
event-editor: Improve event name validation handling
...
- Fix a bug where clicking the "Add Event" button created an empty title in the event editor dialog.
- Add "error" class when the user writes an invalid event name.
- Add new function to validate event name.
Because the sections are split into files, the event editor will need a signal to check that each section is correct, and each section will have to emit the signal. This will need to be done in a future commit.
2024-02-25 08:55:17 -05:00
Hari Rana
1494f7407f
summary-section: Grab focus on summary entry when opening dialog
...
Due to an unintentional behavior change from AdwWindow to AdwDialog, the entry row must be focused after the dialog is displayed.
2024-02-24 22:53:54 +00:00
Hari Rana
2a31fbab7b
calendar-management-dialog: Remove content height
...
The dialog will automatically request a height by itself, which will benefit those who use it in fullscreen and have tons of calendars.
2024-02-23 23:03:51 -05:00
Hari Rana
704af0870d
calendars-page: Remove add_calendar_row ID
...
This removes the leftover and unused code from https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/382 .
2024-02-16 18:16:24 -05:00
Hari Rana
5a2747098b
style: Define all month cells
...
This fixes an issue on the dark style preference where selecting cells would cause the month separators to lose their color. The dark style would override the month cells, which would higher its specificity, and thus would prioritize it over the selectors. This commit places everything in order, so we can freely define colors without playing with specificity.
2024-01-27 14:14:32 -05:00
Hari Rana
a3ac698e60
month-cell: Add month separators
2024-01-27 16:14:17 +00:00
Hari Rana
315d47350f
summary-section: Use AdwEntryRow class
2023-12-17 22:33:34 +00:00
Hari Rana and Gotam Gorabh
303c5fd0fe
calendar-row: Add read-only icon for read-only calendars
...
Co-authored-by: Gotam Gorabh <gautamy672@gmail.com >
2023-12-14 02:46:56 +00:00
Hari Rana
b270176d02
calendars-page: Add AdwClamp to contrain the size
2023-12-14 00:28:21 +00:00
Hari Rana
5a1fce406b
calendar-management: Set width request
...
The minimum width of the dialog was really low, which would make it unreadable, so a width request is being set to set a reasonable minimum width.
2023-12-14 00:20:08 +00:00
Hari Rana
57cb3a7650
alarm-row: Remove GtkBox
...
Uses valign in all buttons, instead of using GtkBox
2023-12-14 00:11:56 +00:00
Hari Rana
033fca7900
calendar-row: Mark string as translatable
2023-12-07 15:03:14 +00:00
Hari Rana
e7a61de5fc
calendars-page: Add shortcuts for Add Calendar
...
The "Add Calendar" button lacked a mnemonic, which made it difficult for keyboard users to activate it. It also adds a Ctrl+N shortcut.
2023-12-04 19:46:10 -05:00
Hari Rana
8c53034864
a11y: Add labels for calendar pages
2023-12-04 18:40:57 +00:00
Hari Rana
2b9be229ea
a11y: Add labels for search
2023-11-30 22:08:23 -05:00
Hari Rana
518de4eb93
help-overlay: Add menu shortcuts
2023-11-07 19:05:12 +00:00
Hari Rana
af6ea3bbda
calendar-button: Add mnemonic for Manage Calendars
2023-11-07 18:56:30 +00:00
Hari Rana
d80536c83b
summary-section: Remove find-location button
2023-08-15 18:28:58 -04:00
Hari Rana
db8127e79a
calendar-row: Port to AdwActionRow
...
`AdwSwitchRow` doesn't allow us to add widgets before the switch as a suffix, which will be required for further use.
2023-08-07 23:15:22 +00:00
Hari Rana
c6aaf730b9
window: Add F5 shortcut for Synchronize Calendars
2023-08-04 19:05:15 -04:00
Hari Rana
f210382bdc
calendar-row: Port to AdwSwitchRow
2023-08-03 22:11:12 -04:00
Hari Rana
3c5a1cf870
notes-section: Disable Tab
2023-08-03 11:26:19 +00:00
Hari Rana
21bfed06e9
schedule-section: Show date when selecting the same day next week
2023-08-02 12:38:53 +00:00
Hari Rana
962646f065
calendar-row: Add go-next icon to indicate subpages
2023-07-29 07:49:44 +00:00
Hari Rana
38455a074f
calendar-button: Add F8 shortcut
2023-07-23 15:27:10 -04:00
Hari Rana
be337bfe70
event-editor-dialog: Various keyboard improvements
...
- Add Esc as shortcut to close window
- Add mnemonics for Cancel and Done buttons
2023-07-23 14:14:33 +00:00
Hari Rana
2bb1ae90e4
calendars-page: Add mnemonic for "Undo"
2023-07-23 09:58:25 -04:00
Hari Rana
0646e00ee6
window: Correct typo
2023-07-21 20:00:45 -04:00
Hari Rana
540c27f72d
calendars-page: Add Esc as shortcut to close window
2023-07-21 15:51:43 -04:00
Hari Rana
cccd2d7118
window: Add shortcut for Manage Calendars
2023-07-21 18:46:23 +00:00
Hari Rana
10c2e20016
calendar-button: Use hyphen
2023-07-20 19:06:07 -04:00