Skip to content

Commit

Permalink
Add documentation for examples and additional enhancements.
Browse files Browse the repository at this point in the history
- Document the titlebar, custom styles, and other examples.
- Document custom widget overrides like sliders, dials, and LCD numbers.
- Convert the Qt5 refs to Qt6.
- Add in better links to examples in the README.
- Add a changelog.
- Make our custom widgets, like titlebars and sliders, to use a
  general-purpose class and then reusable components.
- Ensure we use a shallow clone for our CMake builds.
  • Loading branch information
Alexhuszagh committed Sep 8, 2024
1 parent 8460d78 commit e2330df
Show file tree
Hide file tree
Showing 37 changed files with 992 additions and 524 deletions.
152 changes: 76 additions & 76 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
name: Linters

on: [push, pull_request]

jobs:
lint-version-python:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-os-python:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-cpp:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-tidy
- name: Analysing the code with clang-tidy
shell: bash
run: |
set -eux pipefail
# Windows oddly requires C++20 support due to internal bugs.
if [[ "${RUNNER_OS}" == "Windows" ]]; then
extra_args="-extra-arg=-std=c++20"
passthrough=""
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
# NOTE: The search paths aren't added by default, and we need C then C++ by default
# for our search. This makes the process easier.
extra_args="-extra-arg=-std=c++17 -extra-arg=--stdlib=libc++"
location="$(xcrun --show-sdk-path)"
passthrough="-I${location}/usr/include/c++/v1 -I${location}/usr/include"
else
extra_args="-extra-arg=-std=c++17"
passthrough=""
fi
clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* ${extra_args} example/breeze_theme.hpp -- ${passthrough}
name: Linters

on: [push, pull_request]

jobs:
lint-version-python:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-os-python:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-cpp:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-tidy
- name: Analysing the code with clang-tidy
shell: bash
run: |
set -eux pipefail
# Windows oddly requires C++20 support due to internal bugs.
if [[ "${RUNNER_OS}" == "Windows" ]]; then
extra_args="-extra-arg=-std=c++20"
passthrough=""
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
# NOTE: The search paths aren't added by default, and we need C then C++ by default
# for our search. This makes the process easier.
extra_args="-extra-arg=-std=c++17 -extra-arg=--stdlib=libc++"
location="$(xcrun --show-sdk-path)"
passthrough="-I${location}/usr/include/c++/v1 -I${location}/usr/include"
else
extra_args="-extra-arg=-std=c++17"
passthrough=""
fi
clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* ${extra_args} example/detect/system_theme.hpp -- ${passthrough}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning].
- Configurable stylesheets via themes.
- Custom extension support, such as the advanced docking system.
- Compile Qt resource files (from [chaosink]).
- Documented support for CMake builds (from [ruilvo]).

### Changed

Expand Down Expand Up @@ -61,3 +62,4 @@ and this project adheres to [Semantic Versioning].
[Inverted-E]: https://github.com/Inverted-E/
[eblade]: https://github.com/eblade/
[chaosink]: https://github.com/chaosink/
[ruilvo]: https://github.com/ruilvo/
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/Alexhuszagh/BreezeStyleSheets.git
GIT_TAG origin/main
GIT_PROGRESS ON
GIT_SHALLOW 1
USES_TERMINAL_DOWNLOAD TRUE)
FetchContent_GetProperties(breeze_stylesheets)
Expand Down Expand Up @@ -252,7 +253,7 @@ The support stylesheets include:
- `auto`
- `native` (the system native theme)
And any `-purple`, `-green`, etc. variants can also be used. `auto` will automatically detect if the system theme is light or dark and select the correct theme accordingly. The cross-platform way to detect the correct theme is using `get_theme` in either [Python](/example/breeze_theme.py) or [C++](/example/breeze_theme.hpp). Just include those stand-alone files in your project and you can select the desired theme based on the user's profile settings at startup.
And any `-purple`, `-green`, etc. variants can also be used. `auto` will automatically detect if the system theme is light or dark and select the correct theme accordingly. A recipe for a cross-platform way to detect the correct theme in Python or C++ is shown in our [System Theme Detection](/example/README.md#system-theme-detection).
## Features
Expand Down
Binary file added assets/advanced_docking_system_example.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/custom-standard-icons.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/custom_placeholder_text.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/custom_slider.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/custom_url.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/default-standard-icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 36 additions & 32 deletions assets/gallery.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,127 @@
# Dark Style Sheets
# Gallery

## Breeze Dark
A gallery of various themes and images of the widgets.

## Dark Style Sheets

### Breeze Dark

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Dark theme for Linux"
src="/assets/breeze_dark_linux.png"
title="BreezeDarkLinux"
src="./breeze_dark_linux.png"
title="BreezeDarkLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Dark theme for Windows"
src="/assets/breeze_dark_windows.png"
src="./breeze_dark_windows.png"
title="BreezeDarkWindows"
/>
</figure>

## Breeze Dark Green
### Breeze Dark Green

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Dark-Green theme for Linux"
src="/assets/breeze_dark-green_linux.png"
title="BreezeDarkGreenLinux"
src="./breeze_dark-green_linux.png"
title="BreezeDarkGreenLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Dark-Green theme for Windows"
src="/assets/breeze_dark-green_windows.png"
src="./breeze_dark-green_windows.png"
title="BreezeDarkGreenWindows"
/>
</figure>

## Breeze Dark Purple
### Breeze Dark Purple

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Dark-Purple theme for Linux"
src="/assets/breeze_dark-purple_linux.png"
title="BreezeDarkPurpleLinux"
src="./breeze_dark-purple_linux.png"
title="BreezeDarkPurpleLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Dark-Purple theme for Windows"
src="/assets/breeze_dark-purple_windows.png"
src="./breeze_dark-purple_windows.png"
title="BreezeDarkPurpleWindows"
/>
</figure>

# Light Style Sheets
## Light Style Sheets

## Breeze Light
### Breeze Light

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Light theme for Linux"
src="/assets/breeze_light_linux.png"
title="BreezeLightLinux"
src="./breeze_light_linux.png"
title="BreezeLightLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Light theme for Windows"
src="/assets/breeze_light_windows.png"
src="./breeze_light_windows.png"
title="BreezeLightWindows"
/>
</figure>

## Breeze Light Green
### Breeze Light Green

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Light-Green theme for Linux"
src="/assets/breeze_light-green_linux.png"
title="BreezeLightGreenLinux"
src="./breeze_light-green_linux.png"
title="BreezeLightGreenLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Light-Green theme for Windows"
src="/assets/breeze_light-green_windows.png"
src="./breeze_light-green_windows.png"
title="BreezeLightGreenWindows"
/>
</figure>

## Breeze Light Purple
### Breeze Light Purple

<p align="center"><b>Linux</b></p>
<figure>
<img
<img
alt="Breeze Light-Purple theme for Linux"
src="/assets/breeze_light-purple_linux.png"
title="BreezeLightPurpleLinux"
src="./breeze_light-purple_linux.png"
title="BreezeLightPurpleLinux"
/>
</figure>

<p align="center"><b>Windows</b></p>
<figure>
<img
alt="Breeze Light-Purple theme for Windows"
src="/assets/breeze_light-purple_windows.png"
src="./breeze_light-purple_windows.png"
title="BreezeLightPurpleWindows"
/>
</figure>
Binary file added assets/mismatched_titlebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e2330df

Please sign in to comment.