Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 3.54 KB

CONTRIBUTING.md

File metadata and controls

48 lines (27 loc) · 3.54 KB

Contributing to OneLauncher

Contributions and questions are always welcome! Here's just a couple of things to keep in mind:

  • Remember to search the GitHub Issues before making a bug report or feature request.
  • Please open an issue to discuss changes before creating a pull request.

Development Install

OneLauncher uses Poetry for dependency management. Run poetry install in the root folder of this repository to get everything set up. Once installed, OneLauncher can be started with poetry run onelauncher. Alternatively, Nix can be used.

Nix

OneLauncher comes with a Nix flake for easily replicating the standard development environment. It can be used with direnv or the nix develop command. When using Nix, dependencies aren't installed with poetry. poetry add, ect can still be used for editing the dependency files, but poetry run should not be used.

There is also an FHS environment for testing compiled builds. It can be accessed with nix develop .#fhs.

Building

Build by running poetry run python -m build in the project's root directory. This will output everything to "build/out". Individual scripts can also be called to skip parts of the build or pass arguments to the build tool.

The .NET CLI is required for building the Windows installer.

Translation

OneLauncher uses Weblate for translations. You can make an account and contribute translations through their site. See the project page here.

Coding Conventions

All code is strictly type checked with Mypy and both linted and formatted with Ruff. Pytest unit tests are encouraged.

UI Changes

User interfaces are defined in .ui files that can be visually edited in pyside6-designer. You can use the command onelauncher designer to launch pyside6-designer with OneLauncher's plugins enabled.

UI files must be compiled into Python to be used in OneLauncher. This can be done with pyside6-uic src/onelauncher/example_window.ui -o src/onelauncher/ui/example_window_uic.py, replacing "example_window" with the one being updated.

QSS Classes

OneLauncher uses a system similar to Tailwind CSS for styling UIs responsively.

Here's how it works:

  • The dynamic property qssClass is added to the widget that needs to be styled. This property should always be of the type StringList.
  • Each string in qssClass is a "class" that will affect the widget's styling. This works by selecting for them in dynamically generated Qt Style Sheets.
  • The classes are mainly used to set sizes and margins relative to the system font size. Changes can be previewed live in pyside6-designer.
  • See the Tailwind Docs for specific class names. The currently supported types are padding, margin, width, min-width, max-width, height, min-height, max-height, font-size, and icon-size.