Commit Graph

74 Commits

Author SHA1 Message Date
Fabrizio Iannetti 4e9f195851 support wrapped lines in ical files (as per RFC 5545 section 3.1) 2024-09-16 13:27:52 +02:00
Fabrizio Iannetti 08a699ca9d implement toggle of calendar files in sidebar 2024-09-15 21:40:40 +02:00
Fabrizio Iannetti a3c8e60872 sidebar improvements: split value and list calendar files 2024-09-15 17:27:59 +02:00
Fabrizio Iannetti fdc08e9806 small refactor 2024-09-15 15:04:36 +02:00
Fabrizio Iannetti e9a002ccc1 add support for a sidebar
* button to toggle the sidebar
* currently no content, in future a list of calendars will
  be displayed, with options to show/hide single calendars
2024-09-15 14:33:26 +02:00
Fabrizio Iannetti 4058623bdd debug log when loading calendar files 2024-09-14 09:40:31 +02:00
Fabrizio Iannetti dfbb5a11f8 minimal support for RUST_LOG env variable
only supports: error,warn,info,debug,trace,off

if not set or any other value maps to info
2024-09-14 09:40:11 +02:00
Fabrizio Iannetti bd468e6027 adapt to latest iced (commit 9426418) 2024-09-07 09:35:27 +02:00
Fabrizio Iannetti dbf2c16310 to compile with latest iced (0dcec519be23da6d3bc409dbf7ac65407d59dc12) 2024-09-03 09:58:56 +02:00
Fabrizio Iannetti e2fd0c4d08 adapt to latest iced (555ee3e9c66010c9a90c3ef55d61fbffd48e669d) 2024-07-26 20:34:23 +02:00
Fabrizio Iannetti cd9d710d14 adapt to latest iced (1c1bee6) 2024-07-12 07:18:32 +02:00
Fabrizio Iannetti 6844470500 remove unsed function 2024-07-12 07:10:25 +02:00
Fabrizio Iannetti 063a74f6f3 add public holidays support (background color of day cell) 2024-06-30 08:26:11 +02:00
Fabrizio Iannetti 281aab2a7e adapto iced: change program() call to application() 2024-06-23 09:59:45 +02:00
Fabrizio Iannetti 5a964fe11a adapt to new Task struct instead of Command 2024-06-19 21:49:13 +02:00
Fabrizio Iannetti 7a0f4111d3 tidying: remove unnecessary parameter 2024-06-08 07:31:12 +02:00
fab 4f08088ee1 better grid rendering: avoid thicker lines for adjacent cells
expand each day cell size to overlap the bottom and right borders
with the top and left borders of the next cells
2024-05-19 14:06:55 +02:00
fab e500c3d3ac fix warning 2024-05-19 10:39:02 +02:00
fab daf78f0547 fix build without tracing 2024-05-19 10:38:51 +02:00
fab 83ffb682d6 remove dependency on iced_aw (segmented button)
iced_aw is dropping the segmented_button in Beta branch, suggesting
to use iced button
2024-05-19 10:38:28 +02:00
Fabrizio Iannetti 61c02ceea6 read calendar files from <home>/.local/share/calendars 2024-05-15 07:43:11 +02:00
Fabrizio Iannetti e68e9ab434 ui: reduce font size for the month name (24, same as week numbers) 2024-05-15 05:29:40 +02:00
Fabrizio Iannetti 4116dec2a0 build: use lot optimizations and strip symbols in release 2024-05-15 05:28:50 +02:00
Fabrizio Iannetti 227c1ebaac ui cosmetic: group prev/next buttons 2024-05-13 07:23:34 +02:00
Fabrizio Iannetti c975b4888a move CalendarApp code to app.ars from main 2024-05-12 08:09:34 +02:00
Fabrizio Iannetti f2d3483bd2 trace complete calendar draw() 2024-05-12 07:39:02 +02:00
Fabrizio Iannetti 24995d8021 remove hard-coded weekday/month names
* use chrono format functions
* use locale to get localized names

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-04-28 15:30:36 +02:00
Fabrizio Iannetti f670e0c83d use segmented_button from iced_aw (personal branch for latest iced)
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-04-27 09:40:47 +02:00
Fabrizio Iannetti 0d528bd961 refactor (controls and app message), fix prev/next week
* controls struct (the header above the calendar) to its
  own file
* message into new app module
* implement move to previous/next week

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-04-21 09:48:26 +02:00
Fabrizio Iannetti 5760873a86 Smaller event bar height and font
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-04-21 08:43:02 +02:00
Fabrizio Iannetti d2a1092a7c adapt to latest iced ("program" paradigm)
* CalendarApp does not derive from Application
* use Program::run_with to run the calendar with state
  (from list of calndar files as cli args)

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-04-06 11:08:48 +02:00
Fabrizio Iannetti 7c624ff6ca fix warnings
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-03-17 17:04:23 +01:00
Fabrizio Iannetti 3f3425563c use a 1 pixel margin for text in event bars
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-03-17 17:04:10 +01:00
Fabrizio Iannetti ee34ecc130 adapt to new iced style functions
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-03-09 10:29:46 +01:00
Fabrizio Iannetti 3ae7c8bb6b adapt to latest iced: Widget trait now has a Theme parameter
Theme was made a trait parameter instead of using it from Renderer
and needs to be added to signatures

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-02-06 12:03:27 +01:00
Fabrizio Iannetti ae9abb7768 use simplelog to log messages
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-01-28 10:20:02 +01:00
Fabrizio Iannetti e7a2ee9d80 adapt to latest iced (Widget.size())
Widget combined height() and width() into a single size()
function

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2024-01-20 10:59:21 +01:00
Fabrizio Iannetti 75a019db80 start adding Week view
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-12-21 17:36:53 +01:00
Fabrizio Iannetti 80a05b0b04 refactor: unify month and year calendar views
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-12-09 19:45:05 +01:00
Fabrizio Iannetti aaf6f46316 fix rendering of day number in month view
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-10-09 21:55:34 +02:00
Fabrizio Iannetti 801f6a5c81 improved event visualization
* margin between bars
* fix min row height computation

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-09-29 22:56:24 +02:00
Fabrizio Iannetti 9ce23811d5 naming
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-09-29 22:55:35 +02:00
Fabrizio Iannetti 4d81501fa6 Adapt to latest iced, improve event bar render consistency
* adapt to latest text render interface from iced
* same number of event bars in each row
* accidentally reformatted :-)

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-09-23 10:54:17 +02:00
Fabrizio Iannetti faafc1d5a4 doc: write README
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-09-16 16:27:43 +02:00
Fabrizio Iannetti 977c3f4c02 differentiate top-bar between month and year views
* prev and next buttons change year in year view
* do not show month name in year view

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-09-11 07:49:01 +02:00
Fabrizio Iannetti 5788a8fffa Code cleaning 2023-09-10 11:01:05 +02:00
Fabrizio Iannetti 6bc32790a1 remove debug prints
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-07-09 20:32:09 +02:00
Fabrizio Iannetti d5b9799618 fix incorrect stacking of overlapping events from multiple calendars
sort the event collection after adding a calendar, as the drawing
functions rely on the event collection to be sorted by begin date

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-07-09 20:31:18 +02:00
Fabrizio Iannetti ab28f9227e many improvements
* latest iced
* read events from ical files (using the  icalendar crate)
* ical files specified on command line (using clap, bit overkill)

Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-07-09 18:49:42 +02:00
fab 1a08bfbcdc improved event rendering
* events that span over multiple days ar rendered as a single bar
  instead of a series of per-day events

Signed-off-by: fab <fab@pop-os.localdomain>
2023-06-25 14:35:34 +02:00