Skip to content

Follow PyQt6 API changes in diverging-mode editor#86

Open
dnadlinger wants to merge 1 commit into
matplotlib:mainfrom
dnadlinger:pyqt6-fixes
Open

Follow PyQt6 API changes in diverging-mode editor#86
dnadlinger wants to merge 1 commit into
matplotlib:mainfrom
dnadlinger:pyqt6-fixes

Conversation

@dnadlinger
Copy link
Copy Markdown

@dnadlinger dnadlinger commented May 14, 2026

As per the title – it appears the diverging-mode-specific code hasn't been tested since moving to PyQt6 by default.

Comment thread viscm/gui.py
smoothness_slider_num = QtWidgets.QLabel("1000.00")
metrics = QtGui.QFontMetrics(smoothness_slider_num.font())
max_width = metrics.width("1000.00")
max_width = metrics.horizontalAdvance("1000.00")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This could also be boundingRect(…).width().

@mfisher87
Copy link
Copy Markdown
Collaborator

Woops! That was probably my fault :) Thanks for the PR! I'll try and find time to review soon, but ... yeesh. I don't want to promise it'll be quick right now 😬

@dnadlinger
Copy link
Copy Markdown
Author

dnadlinger commented May 14, 2026

Thanks!

I'll note that it should be fairly straightforward to review, as it only adds the explicit enum types, like already done in the other places.

(No rush – I'm aware that the last commit to main was almost three years ago – but since I'm reviving the tool for my own needs anyway, incl. some fixes to diverging mode and a port to colour-science for broader colour space support, it seemed a shame not to share my fixes.)

@mfisher87
Copy link
Copy Markdown
Collaborator

(No rush – I'm aware that the last commit to main was almost three years ago – but since I'm reviving the tool for my own needs anyway, incl. some fixes to diverging mode and a port to colour-science for broader colour space support, it seemed a shame not to share my fixes.)

Whoa, time really flies! That's the exact situation I was in 3 years ago. It doesn't feel like it was 3 years ago though! I was giving a workshop and needed viscm as a visual/exploratory aide for talking about perceptual uniformity. Thanks so much for continuing the cycle and sharing the fixes back :)

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.

2 participants