Skip to content

Conversation

ulfarsson
Copy link
Member

Brought tilingsgui out of the dark ages. I might need make some minor changes, but it is mostly fine in CPython. PyPy support is a bit tricky.

Replaces Travis CI with GitHub Actions workflows, adds CodeQL analysis, and introduces Dependabot configuration for automated dependency updates. Updates Python support to 3.8+ in setup.py and pyproject.toml, modernizes pre-commit hooks, and expands .gitignore for better cross-platform and tool coverage. Adds SECURITY.md and .python-version, removes .travis.yml, and makes minor docstring and formatting improvements throughout the codebase.
Added build-system section to pyproject.toml for setuptools and wheel. Updated GitHub Actions workflow to install setuptools separately. Modified tox.ini to include setuptools as a dependency. Improved .pylintrc init-hook and disabled too-many-positional-arguments warning. Fixed style dict usage in widgets.py for pyglet text document.
Replaces low-level pyglet.graphics drawing calls with pyglet.shapes primitives for lines, circles, and rectangles in graphics and widgets modules. Adds platform-specific handling for PyObjC dependencies and pyglet options for better compatibility on macOS, including PyPy support. Updates setup.py to install PyObjC only on CPython/macOS, and improves documentation for macOS and PyPy users.
Changed the return type of TilingGui.on_resize to Literal[True] for more precise typing. Added a type: ignore comment when instantiating TilingGui in main.py to suppress a type checker warning.
Increased the top bar height and font sizes in the menu for better readability. Updated text box and background colors in the menu for a lighter appearance. Standardized color usage in tplot by applying scale_to_01 to all color constants.
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Updated initial window and UI bar sizes for a larger interface. Increased font sizes in menu components for better readability. Improved text and button image positioning and scaling in widgets for more consistent appearance. Fixed a typo in ButtonGrid's rect assignment and adjusted padding.
Replace disabling of pyglet's shadow window with an explicit warning and exit when running on PyPy with macOS, as this configuration is not supported. This prevents users from encountering subtle runtime issues.
Explicitly cast button width and height to float when calculating scale factors to ensure correct aspect ratio scaling and avoid integer division issues.
Updated the Button widget to handle both AbstractImage and Animation types when scaling sprites. The code now checks for width and height attributes on the image, falling back to sprite dimensions if necessary, ensuring correct scaling for different image types.
Moved RGB-to-RGBA color conversion into a new Color.scale_to_255 method and updated all usages in graphics.py and widgets.py to use this utility. Removed platform-specific dependencies from setup.py for a simpler install_requires.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant