Skip to content

Commit

Permalink
Improve documentation for local development.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Sep 8, 2024
1 parent 08e4ae6 commit 150ba70
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Custom padding for triangular QTabBars on the bottom is ignored. All other tab p

# QTextDocument

### Placeholder Text
### Placeholder Text

For the widgets `QTextEdit`, `QPlainTextEdit`, and `QLineEdit`, which use an internal `QTextDocument`, you can set placeholder text for when no text is present. In Qt5, this is correctly grayed out when the placeholder text is present, which is not respected in Qt6 (as of Qt version 6.3.0).

Expand All @@ -96,7 +96,7 @@ An example workaround setting the placeholder text at palette at the application
#include <QColor>
#include <QPalette>

int main(int argc, char* argv[])
int main(int argc, char* argv[])
{
QApplication app(argc, argv);

Expand Down Expand Up @@ -154,7 +154,7 @@ However, this won't work with markdown input, and requires you to modify any exi
#include <QColor>
#include <QPalette>

int main(int argc, char* argv[])
int main(int argc, char* argv[])
{
QApplication app(argc, argv);

Expand Down Expand Up @@ -206,7 +206,7 @@ A simple example of creating a `QToolButton` with text and with no menu drop-dow
#include <QString>
#include <QToolButton>

int main(int argc, char* argv[])
int main(int argc, char* argv[])
{
QApplication app(argc, argv);

Expand Down Expand Up @@ -369,12 +369,12 @@ def main():
# Install our custom style globally. QCommonStyle, unlike QProxyStyle,
# actually works nicely with stylesheets. `Fusion` is available
# on all platforms, but you can use any style you want. We
# just need a created style, because `app.style()` will be
# just need a created style, because `app.style()` will be
# deleted by he garbage collector.
style = QtWidgets.QStyleFactory.create('Fusion')
app.setStyle(ApplicationStyle(style))

# Set our stylesheet.
# Set our stylesheet.
# NOTE: this must occur after setting the application style.
file = QtCore.QFile('dark:stylesheet.qss')
file.open(OpenModeFlag.ReadOnly | OpenModeFlag.Text)
Expand Down
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BreezeStyleSheets is a set of beautiful light and dark stylesheets that render c
- [Git Ignore](#git-ignore)
- [What's changed in this fork?](#whats-changed-in-this-fork)
- [Known Issues and Workarounds](#known-issues-and-workarounds)
- [Developing](#developing)
- [License](#license)
- [Contributing](#contributing)
- [Acknowledgements](#acknowledgements)
Expand Down Expand Up @@ -537,6 +538,42 @@ git commit -m "..."

For known issues and workarounds, see [issues](/ISSUES.md).

# Developing

Contributors to BreezeStylesheets should make use of [vcs](/vcs.py) and [scripts](/scripts/) to both install Git hooks and run local tests and typechecking. After cloning the repository, developers should first install a pre-commit hook, to ensure their code is formatted and linted prior to commiting:

```bash
python vcs.py --install-hooks
```

You can also manually run each check independently:

```bash
# format python code to a standard style.
# requires `black` and `isort` to be installed.
scripts/fmt.sh
# run linters and static typecheckers
# requires `pylint`, `pyright`, and `flake8` to be installed
scripts/lint.sh
# check if the system can automatically determine the theme
# on windows, this requires `winrt-Windows.UI.ViewManagement`
# and `winrt-Windows.UI` to be installed.
scripts/theme.sh
# run more involved, comprehensive tests. these assume a Linux
# environment and detail the install scripts to use them.
scripts/cmake.sh
scripts/headless.sh
```

You should also stop tracking changes to generated files from source control until desired. This avoids large commits for minor changes that are reverted later.

```bash
# don't track changes to generated file, like in dist
python vcs.py --no-track-dist
# retrack changes to these files.
python vcs.py --track-dist
```

# License

MIT, see [license](/LICENSE.md).
Expand Down

0 comments on commit 150ba70

Please sign in to comment.