Skip to content

Commit

Permalink
Improve stylesheet aliases for examples and configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Sep 8, 2024
1 parent e2330df commit 5b9625b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: this file is auto-generated via `git.py`
# NOTE: this file is auto-generated via `vcs.py`
# DO NOT MANUALLY EDIT THIS FILE.
TODO.md
dist/
Expand Down
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ def configure(args):

# Create aliases for our light-blue and dark-blue styles to light and dark.
# Only create aliases if light-blue and/or dark-blue are to be built.
themes = [theme for theme in args.styles if theme in ('dark-blue', 'light-blue')]
for theme in themes:
aliases = set(args.styles) & {'dark-blue', 'light-blue'}
for theme in aliases:
source = args.output_dir / theme / 'stylesheet.qss'
destination = args.output_dir / theme.split('-')[0] / 'stylesheet.qss'
destination.parent.mkdir(exist_ok=True)
Expand Down
4 changes: 2 additions & 2 deletions example/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def normalize_stylesheet(stylesheet):
stylesheet = 'native'

# Needed so we remove any aliases. See #106.
if stylesheet in ('dark-blue', 'light-blue'):
stylesheet = stylesheet[: len('-blue') - 1]
if stylesheet in ('dark', 'light'):
stylesheet += '-blue'
return stylesheet


Expand Down

0 comments on commit 5b9625b

Please sign in to comment.