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
Fabrizio Iannetti
e28288b2c6
updated Cargo.lock
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-06-17 09:21:24 +02:00
fab
e94234e9c8
fix build warnings when tracing is disabled
...
Signed-off-by: fab <fab@pop-os.localdomain>
2023-06-17 09:18:51 +02:00
Fabrizio Iannetti
f8e5887f24
adapt to latest iced (Widget::draw accepts a mouse::Cursor)
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-06-17 09:14:28 +02:00
Fabrizio
36d3ce3a09
disable generation of lttng tracepoints if no tracing feature set
...
Signed-off-by: Fabrizio <fab@pop-os.localdomain>
2023-06-04 09:36:26 +02:00
Fabrizio Iannetti
7550842126
fix alignment of month names in month view
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-05-29 08:29:10 +02:00
Fabrizio Iannetti
3135507688
remove duplicate event rendering
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-05-21 14:56:29 +02:00
Fabrizio Iannetti
ae13e98388
Adapt to new iced version, show events in month view
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-05-21 13:41:16 +02:00
Fabrizio Iannetti
c805cc94d3
cell grid robust against null dimensions
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-03-17 19:21:21 +01:00
Fabrizio Iannetti
6fb0761911
adapt to iced 0.8
...
* font size is now an f32
* Alignment::Fill was removed
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-03-05 08:21:38 +01:00
Fabrizio Iannetti
e01b2b3ceb
add text to events
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-02-11 11:43:24 +01:00
Fabrizio Iannetti
dcaf8a8df9
ui: add experimental list view element (not used)
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-01-28 09:31:22 +01:00
Fabrizio Iannetti
ca0bc137ad
debug: add optional tracing via lttng-ust
...
* new feature `tracing`, enable with `--features tracing`
* draw entry/exit tracepoints
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-01-28 09:30:33 +01:00
Fabrizio Iannetti
7085a2eed8
Start adding support for events
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2023-01-15 15:38:41 +01:00
Fabrizio Iannetti
966752614a
better names for day text colours
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-27 09:29:29 +01:00
Fabrizio Iannetti
f2f4e36c20
simplify CellGrid
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-26 07:52:11 +01:00
Fabrizio Iannetti
7c682495d7
Some refactoring:
...
- use iced Application instead of Sandbox
- use CellGrid to create the calendar widgets
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-25 12:14:01 +01:00
Fabrizio Iannetti
deb2335fe8
Improved cell grid
...
* CellAxis struct to interate over cells in a direction (hor. or vert.)
* used in MontlyView
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-10 12:50:28 +01:00
Fabrizio Iannetti
150216a920
define ui module in ui.rs rather than generic mod.rs
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-09 19:36:57 +01:00
Fabrizio Iannetti
1a2b7936c2
adapt to BorderRadius (4 corner radi instead of single value)
...
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-12-03 09:47:57 +01:00
Fabrizio Iannetti
8e8f06cd56
year view
2022-11-23 21:54:17 +01:00
Fabrizio Iannetti
6f00d075c1
Refactor
...
* use std::date instead of plain integers and own functions
* add a drop down for view type (not functional)
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-10-16 14:51:37 +02:00
fab
a0406c0da7
mixed changes
...
- weeks column
- start using chrono for date caluclations
2022-09-25 08:23:14 +02:00
fab
d91f44e410
Adapt to iced pure (stateless widgets)
...
Signed-off-by: fab <fab@pop-os.localdomain>
2022-08-15 12:05:00 +02:00
Fabrizio Iannetti
23a3102df0
First version of calendar app
...
- Monthly View
- prev/next month buttons
- year hard-coded to 2022
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2022-08-09 21:18:11 +02:00