Add cursor hour header highlighting in calendar week view

This commit is contained in:
Bendt
2025-12-19 16:25:42 -05:00
parent 9f596b10ae
commit 4836bda9f9
2 changed files with 10 additions and 3 deletions

View File

@@ -364,6 +364,9 @@ class WeekGridBody(ScrollView):
current_row = (now.hour * rows_per_hour) + (now.minute // minutes_per_row)
is_current_time_row = row_index == current_row
# Check if cursor is on this row
is_cursor_row = row_index == self.cursor_row
# Time label (only show on the hour)
if row_index % rows_per_hour == 0:
hour = row_index // rows_per_hour
@@ -371,8 +374,12 @@ class WeekGridBody(ScrollView):
else:
time_str = " " # Blank for half-hour
# Style time label - highlight current time, dim outside work hours
if is_current_time_row:
# Style time label - highlight current time or cursor, dim outside work hours
if is_cursor_row:
# Highlight the hour label when cursor is on this row
primary_color = self._get_theme_color("primary")
time_style = Style(color=primary_color, bold=True, reverse=True)
elif is_current_time_row:
error_color = self._get_theme_color("error")
# Add subtle background to current time row for better visibility
surface_color = self._get_theme_color("surface")