Skip to content

silx view: Added dark/light mode option; Dependencies: Require PyQt6/PySide6 >=6.5#4487

Open
t20100 wants to merge 3 commits intomainfrom
silx-view-color-scheme
Open

silx view: Added dark/light mode option; Dependencies: Require PyQt6/PySide6 >=6.5#4487
t20100 wants to merge 3 commits intomainfrom
silx-view-color-scheme

Conversation

@t20100
Copy link
Member

@t20100 t20100 commented Feb 26, 2026

This PR adds a color scheme menu to toggle dark/light mode.

  • Add support for qt6<6.5 and qt5 which doesn't have color scheme API

@t20100 t20100 marked this pull request as draft February 27, 2026 07:56
@t20100 t20100 force-pushed the silx-view-color-scheme branch from b01d10d to de95c5f Compare March 3, 2026 16:42
@t20100 t20100 changed the title silx view: Added dark/light mode option silx view: Added dark/light mode option; Dependencies: Require PyQt6/PySide6 >=6.5 Mar 3, 2026
@t20100 t20100 marked this pull request as ready for review March 3, 2026 16:42
@t20100
Copy link
Member Author

t20100 commented Mar 3, 2026

Added support for Qt5 and added requirement PyQt and PySide >= 6.5

@t20100 t20100 force-pushed the silx-view-color-scheme branch from de95c5f to 833e592 Compare March 4, 2026 09:03
import PySide6 as QtBinding # noqa

if Version(QtBinding.__version__) < Version("6.4"):
if Version(QtBinding.__version__) < Version("6.5"):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enforces QT>=6.5 (April 2023), IMO affordable since we make a major release

Comment on lines +686 to +687
if qt.BINDING == "PyQt5":
self._colorSchemeMenu.setEnabled(False)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic way to support Qt5, no longer the main target IMO

@t20100 t20100 requested review from loichuder and payno March 4, 2026 13:53
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