Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'current' theme #805

Closed
zwimer opened this issue Nov 30, 2022 · 5 comments · Fixed by #1374 · May be fixed by #806
Closed

No 'current' theme #805

zwimer opened this issue Nov 30, 2022 · 5 comments · Fixed by #1374 · May be fixed by #806
Assignees
Labels

Comments

@zwimer
Copy link
Member

zwimer commented Nov 30, 2022

Description

When loading a theme in angr-management, there are 3 options: Light, Dark, and Current. Selecting Current can cause:

Traceback (most recent call last):
  File "/Users/zwimer/.virtualenvs/am-dev/lib/python3.10/site-packages/angrmanagement/ui/dialogs/preferences.py", line 151, in _on_load_scheme_clicked
    self._load_color_scheme(self._schemes_combo.currentText())
  File "/Users/zwimer/.virtualenvs/am-dev/lib/python3.10/site-packages/angrmanagement/ui/dialogs/preferences.py", line 146, in _load_color_scheme
    for prop, value in COLOR_SCHEMES[name].items():
KeyError: 'Current'

Steps to reproduce the bug

rm -rf ~/.config/angr-management
angr-management

Open preferences
"Themes and Colors"
Beside "Load Theme" select Current
Click "Load"

Environment

41b574e

Additional context

No response

@zwimer zwimer added the bug label Nov 30, 2022
@zwimer zwimer self-assigned this Nov 30, 2022
@zwimer
Copy link
Member Author

zwimer commented Nov 30, 2022

@mborgerson What is "Current" as a theme choice supposed to do? A no-op?

@zwimer
Copy link
Member Author

zwimer commented Nov 30, 2022

Is it supposed to be the System theme? If so, I think we should rename this to "System".

@mborgerson
Copy link
Member

'Current' is supposed to mean whatever is currently configured. e.g. if the user loads the Dark theme, Dark theme values are copied to Current

@zwimer
Copy link
Member Author

zwimer commented Dec 1, 2022

What is the rational for having "Current" when the loaded theme is already in the combobox selector and should be auto-selected when the preference tab opens? Or what does it add?

@zwimer
Copy link
Member Author

zwimer commented Dec 2, 2022

I'll remove the Current for now, this will is done in #806

@ltfish ltfish assigned ltfish and unassigned zwimer Feb 4, 2025
ltfish added a commit that referenced this issue Feb 4, 2025
- Do not save all color settings when one of the default color schemes
  is in use. Fixes #1039.
- Only load a new color scheme when the "Save" button is clicked.
- Introduce a "base_theme_name" setting that the Custom theme uses (to
  load icons, etc.). Do not attempt to load resources from non-existent
  directorys. Fixes #805.
- Switch to medium font weight for pseudocode view to reduce eye stress.
- Fix the issue that the new theme does not immediately apply to
  CodeEdit, CodeEdit panels, or text in the function table view.
- Remove non-color settings from the default color schemes.
@ltfish ltfish closed this as completed in 230d65e Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants