Skip to content

Resolve the watermark image name like the splash screen image - #36

Merged
PierreRaybaut merged 3 commits into
developfrom
fix/watermark-path-persistence
Oct 30, 2026
Merged

PierreRaybaut merged 3 commits into
developfrom
fix/watermark-path-persistence

Conversation

@PierreRaybaut

Copy link
Copy Markdown
Contributor

Resolve the watermark image name like the splash screen image.

  • _setup_watermark: a value that is not an existing file is looked up with get_image_file_path and loaded with get_pixmap (@2x variant on high-DPI displays); other values are still loaded with QPixmap (e.g. Qt resource paths).
  • Option description updated.
  • Tests: name resolution with @2x variant, unresolved name not preventing plot widget creation.
  • Release notes 1.1.0 + French translation.

Related: DataLab-Platform/DataLab#462

Closes #35

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
@PierreRaybaut
PierreRaybaut merged commit 37af73e into develop Oct 30, 2026
8 checks passed
@PierreRaybaut
PierreRaybaut deleted the fix/watermark-path-persistence branch October 30, 2026 06:09
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