Skip to content

Commit

Permalink
Merge pull request #111 from Inverted-E/main
Browse files Browse the repository at this point in the history
Finished aliasing modifications & merged theme changes.

Related to #101.
  • Loading branch information
Alexhuszagh authored Sep 8, 2024
2 parents 150ba70 + 17af379 commit 13826e0
Show file tree
Hide file tree
Showing 747 changed files with 32,070 additions and 129,043 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ Example user interface using the Breeze and BreezeDark stylesheets side-by-side.
</tbody>
</table>

Alternative themes - Change QTableWidget hover behavior to highlight whole row, instead of individual cells.

<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><img src="./assets/dark-blue.png" alt="Dark blue standard demo" ></td>
<td><img src="./assets/dark-blue-alt.png" alt="Dark blue alt demo" ></td>
</tr>
</tbody>
</table>

For an extensive view of screenshots of the theme, see the [gallery](assets/gallery.md).

# Customization
Expand Down
Binary file added assets/dark-blue-alt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dark-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def parse_args(argv=None):
parser.add_argument(
'--styles',
help='comma-separate list of styles to configure. pass `all` to build all themes',
default='light,dark',
default='light-blue,dark-blue',
)
parser.add_argument(
'--extensions',
Expand Down Expand Up @@ -335,7 +335,10 @@ def write_qrc(config, qt_dist):
for style in config['themes'].keys():
files = os.listdir(f'{qt_dist}/{style}')
resources += [f'{style}/{i}' for i in files]
resources += ['dark-blue/stylesheet.qss', 'light-blue/stylesheet.qss']
if 'dark-blue' in config['themes'].keys():
resources.append('dark/stylesheet.qss')
if 'light-blue' in config['themes'].keys():
resources.append('light/stylesheet.qss')

qrc_path = config['resource']
if not os.path.isabs(qrc_path):
Expand Down Expand Up @@ -412,11 +415,12 @@ def configure(args):
for style in config['themes']:
configure_style(config, style, str(args.output_dir))

# create aliases for our light and dark styles to light-blue and dark-blue
# FIXME: Invert the order: light should be an alias of light-blue, etc.
for theme in ('dark', 'light'):
# 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:
source = args.output_dir / theme / 'stylesheet.qss'
destination = args.output_dir / f'{theme}-blue' / 'stylesheet.qss'
destination = args.output_dir / theme.split('-')[0] / 'stylesheet.qss'
destination.parent.mkdir(exist_ok=True)
shutil.copy2(source, destination)

Expand Down
Loading

0 comments on commit 13826e0

Please sign in to comment.