Add cursor hour header highlighting in calendar week view
This commit is contained in:
@@ -447,7 +447,7 @@ Implement `/` keybinding for search across all apps with similar UX:
|
||||
|
||||
### Phase 2: Medium Priority
|
||||
1. ~~Sync: Default to TUI mode~~ (DONE - already implemented)
|
||||
2. Calendar: Cursor hour header highlighting
|
||||
2. ~~Calendar: Cursor hour header highlighting~~ (DONE)
|
||||
3. Calendar: Responsive detail panel
|
||||
4. Calendar: Sidebar mini-calendar
|
||||
5. Calendar: Calendar invites sidebar
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user