Skip to content

Commit

Permalink
Fixing color conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
anufrievroman committed Mar 4, 2023
1 parent be6a938 commit 5d93bca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions calcure/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def render(self):
task_view = TaskView(self.stdscr, self.y, self.x, task, self.screen)
task_view.render()
if self.screen.selection_mode:
self.display_line(self.y, self.x, str(index + 1), Color.TODAY)
self.display_line(self.y, self.x, str(index + 1), Color.ACTIVE_PANE)
self.y += 1

self.y += 1
Expand Down Expand Up @@ -403,7 +403,7 @@ def render(self):
user_event_view = UserEventView(self.stdscr, self.y + index, self.x, event, self.screen)
user_event_view.render()
if self.screen.selection_mode and self.is_selection_day:
self.display_line(self.y + index, self.x, str(index + self.index_offset + 1), Color.TODAY)
self.display_line(self.y + index, self.x, str(index + self.index_offset + 1), Color.ACTIVE_PANE)
else:
self.display_line(self.y + self.y_cell - 2, self.x, self.hidden_events_sign, Color.EVENTS)
index += 1
Expand Down Expand Up @@ -694,7 +694,8 @@ def render(self):

is_selection_day = True
for _ in range(max_num_days):
day_string = f'{self.screen.day} {DAYS[self.week_day]} {self.icon}'
day_string = f"{self.screen.day} {DAYS[self.week_day]} {self.icon}"
day_string += " " * (max([len(day_name) for day_name in DAYS]) + 3 + len(self.icon) - len(day_string))
self.display_line(self.y + 2 + vertical_shift, self.x, day_string, self.color)

daily_view = DailyView(self.stdscr, self.y + 3 + vertical_shift, self.x, repeated_user_events,
Expand Down Expand Up @@ -878,13 +879,13 @@ def render(self):
self.display_line(self.global_shift_y + 2, self.global_shift_x + 8,
TITLE_KEYS_GENERAL, Color.TITLE, cf.BOLD_TITLE, cf.UNDERLINED_TITLE)
for index, key in enumerate(KEYS_GENERAL):
self.display_line(self.global_shift_y + index + 3, self.global_shift_x, key, Color.TODAY)
self.display_line(self.global_shift_y + index + 3, self.global_shift_x, key, Color.ACTIVE_PANE)
self.display_line(self.global_shift_y + index + 3, self.global_shift_x + 8, KEYS_GENERAL[key], Color.TODO)

self.display_line(self.global_shift_y + 4 + len(KEYS_GENERAL), self.global_shift_x + 8,
TITLE_KEYS_CALENDAR, Color.TITLE, cf.BOLD_TITLE, cf.UNDERLINED_TITLE)
for index, key in enumerate(KEYS_CALENDAR):
self.display_line(self.global_shift_y + index + 5 + len(KEYS_GENERAL), self.global_shift_x, key, Color.TODAY)
self.display_line(self.global_shift_y + index + 5 + len(KEYS_GENERAL), self.global_shift_x, key, Color.ACTIVE_PANE)
self.display_line(self.global_shift_y + index + 5 + len(KEYS_GENERAL), self.global_shift_x + 8,
KEYS_CALENDAR[key], Color.TODO)

Expand All @@ -893,7 +894,7 @@ def render(self):
d_y = self.global_shift_y + self.shift_y
self.display_line(d_y, d_x + 8, TITLE_KEYS_JOURNAL, Color.TITLE, cf.BOLD_TITLE, cf.UNDERLINED_TITLE)
for index, key in enumerate(KEYS_TODO):
self.display_line(d_y + index + 1, d_x, key, Color.TODAY)
self.display_line(d_y + index + 1, d_x, key, Color.ACTIVE_PANE)
self.display_line(d_y + index + 1, d_x + 8, KEYS_TODO[key], Color.TODO)

# Additional info:
Expand Down
2 changes: 1 addition & 1 deletion calcure/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def read_parameters_from_user_arguments(self):
self.DEFAULT_VIEW = AppState.HELP
elif opt in ('-v'):
self.DEFAULT_VIEW = AppState.EXIT
print ('Calcure - version 2.8')
print ('Calcure - version 2.8.2')
elif opt in ('-i'):
self.USE_PERSIAN_CALENDAR = True
except getopt.GetoptError:
Expand Down

0 comments on commit 5d93bca

Please sign in to comment.