Skip to content

Commit

Permalink
Merge branch 'reusable' of https://github.com/pyapp-kit/magicgui into…
Browse files Browse the repository at this point in the history
… reusable
  • Loading branch information
tlambert03 committed Feb 16, 2024
2 parents dfbfe2c + b1c649f commit 01dc799
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
with:
python-version: "3.11"

- uses: tlambert03/setup-qt-libs@v1.5
- uses: tlambert03/setup-qt-libs@v1.6

- name: Install dependencies
run: |
Expand All @@ -67,7 +67,6 @@ jobs:

- uses: codecov/codecov-action@v3


test-dependents:
uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ repos:


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
rev: v0.1.6
hooks:
- id: ruff
args: ["--fix"]

- repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.11.0
hooks:
- id: black

Expand All @@ -30,7 +30,7 @@ repos:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.7.1
hooks:
- id: mypy
files: "^src/"
Expand Down
2 changes: 2 additions & 0 deletions src/magicgui/backends/_qtpy/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ def _mgui_render(self) -> numpy.ndarray:
) from None

img = self._qwidget.grab().toImage()
if img.format() != QImage.Format_ARGB32:
img = img.convertToFormat(QImage.Format_ARGB32)
bits = img.constBits()
h, w, c = img.height(), img.width(), 4
if qtpy.API_NAME.startswith("PySide"):
Expand Down

0 comments on commit 01dc799

Please sign in to comment.