Repository navigation
Resolve the watermark image name like the splash screen image - #36
Merged
Merged
Conversation
DockablePlotWidget only accepted a file path (or a Qt resource path) in the watermark_image_path option, whereas the splash screen image may be given by its name. An application then had to store the absolute path of its own image in the option, which depends on the installation. - _setup_watermark: a value that is not an existing file is looked up in the image paths registered with guidata (get_image_file_path), and the image is loaded with get_pixmap, which uses its @2x variant on high-DPI displays. Other values are still loaded with QPixmap (e.g. Qt resource paths). - Option description updated accordingly. - Tests: image name resolution with @2x variant, unresolved name not preventing the creation of the plot widget. Assisted-by: Claude Opus 5.5
Add the 1.1.0 note on the watermark image of empty plots given by its name, and its French translation. Assisted-by: Claude Opus 5.5
With Qt 6, QLabel.pixmap does not return the device pixel ratio of the pixmap passed to setPixmap, which made the watermark test fail with PyQt6: check the pixmap loaded by get_pixmap instead. Refs #35 Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve the watermark image name like the splash screen image.
_setup_watermark: a value that is not an existing file is looked up withget_image_file_pathand loaded withget_pixmap(@2xvariant on high-DPI displays); other values are still loaded withQPixmap(e.g. Qt resource paths).@2xvariant, unresolved name not preventing plot widget creation.Related: DataLab-Platform/DataLab#462
Closes #35