Skip to content

Commit 8892978

Browse files
Merge pull request #94 from PlotPyStack/fix/93-icon-name-conflicts
Designate ambiguous icons explicitly, use guidata's icons
2 parents 97b51df + 10ed282 commit 8892978

70 files changed

Lines changed: 58 additions & 1094 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎doc/intro/licenses.rst‎

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ image and icon under the plotpy/data/icons directory.
5151

5252
The icons are SVG reconstructions (2026) of the historical PNG icons: the notices
5353
and licenses of the original artwork remain. They are also provided in the
54-
plotpy/data/icons/LICENSES.txt file.
54+
plotpy/data/icons/LICENSES.txt file. The icons shared with guidata (e.g. editors,
55+
file types, Python logo) are provided by guidata (see guidata's
56+
guidata/data/icons/LICENSES.txt file).
5557

5658

5759
-------------------------------------------------------------------------------
@@ -91,74 +93,9 @@ Files covered:
9193

9294
* plotpy/data/icons/arrow_down.svg
9395
* plotpy/data/icons/arrow_up.svg
94-
* plotpy/data/icons/cell_edit.svg
95-
* plotpy/data/icons/edit.svg
96-
* plotpy/data/icons/editors/edit.svg
97-
* plotpy/data/icons/editors/edit_add.svg
98-
* plotpy/data/icons/editors/editcopy.svg
99-
* plotpy/data/icons/editors/editdelete.svg
100-
* plotpy/data/icons/editors/editpaste.svg
101-
* plotpy/data/icons/editors/filesave.svg
102-
* plotpy/data/icons/editors/imshow.svg
103-
* plotpy/data/icons/editors/insert.svg
104-
* plotpy/data/icons/editors/plot.svg
105-
* plotpy/data/icons/editors/rename.svg
10696
* plotpy/data/icons/eraser.svg
107-
* plotpy/data/icons/exit.svg
108-
* plotpy/data/icons/fileclose.svg
109-
* plotpy/data/icons/fileimport.svg
110-
* plotpy/data/icons/filenew.svg
111-
* plotpy/data/icons/fileopen.svg
112-
* plotpy/data/icons/filesave.svg
113-
* plotpy/data/icons/filesaveas.svg
11497
* plotpy/data/icons/magnifier.svg
11598
* plotpy/data/icons/print.svg
116-
* plotpy/data/icons/save_all.svg
117-
118-
-------------------------------------------------------------------------------
119-
120-
Python Logo
121-
-----------
122-
123-
124-
Copyright (c) 2008 Python Software Foundation
125-
126-
127-
| Author: Python Software Foundation | https://www.python.org/
128-
| Source/Download: https://www.python.org/community/logos/
129-
| License: Python Software Foundation License Version 2 https://docs.python.org/3/license.html
130-
| Trademark: Python Software Foundation Trademark Usage Policy https://www.python.org/psf/trademarks/
131-
132-
Modifications: SVG reconstruction of the historical PNG, 2026.
133-
134-
135-
The Python logo is a trademark of the Python Software Foundation,
136-
which is responsible for defending against
137-
any damaging or confusing uses of the trademark.
138-
139-
See the PSF Trademark Usage Policy: https://www.python.org/psf/trademarks/
140-
141-
In general, we want the logo to be used as widely as possible to indicate
142-
use of Python or suitability for Python. However, please ask first when using
143-
a derived version of the logo or when in doubt.
144-
145-
Projects and companies that use Python are encouraged to incorporate the
146-
Python logo on their websites, brochures, packaging, and elsewhere to indicate
147-
suitability for use with Python or implementation in Python. Use of the
148-
"two snakes" logo element alone, without the accompanying wordmark is permitted
149-
on the same terms as the combined logo.
150-
151-
152-
See below for the full text of the PSF License Version 2.
153-
154-
The license history and text can be found online at:
155-
https://docs.python.org/3/license.html
156-
157-
158-
Files covered:
159-
160-
* plotpy/data/icons/python.svg
161-
16299

163100
-------------------------------------------------------------------------------
164101

‎doc/release_notes/release_2.12.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* **Images on high-DPI screens** — With a display scaling factor such as 125 %, 150 % or 200 %, images were rendered at the resolution of the plot canvas and then upscaled to the screen resolution: with a 200 % scaling, images were shown with half the resolution of the screen, and with a 125 % scaling, one screen pixel row and column out of five were duplicated, which made fine image details (e.g. noise, thin lines) look irregular. Images are now rendered at the resolution of the screen; printing and exporting are not affected. Rendering images at the screen resolution takes more time: for a 2000 × 2000 image shown in a 700 × 700 plot, about 8 ms instead of 7 ms with a 125 % scaling and 19 ms instead of 7 ms with a 200 % scaling (104 ms instead of 28 ms with the anti-aliasing interpolation). The new `image/device_resolution` option of the `plot` configuration section restores the previous behavior
88
* **Raw image items** — `RawImageItem` objects were not drawn: each redraw failed with `ValueError: Invalid destination rectangle (expected tuple of 4 integers)`
99
* **Blurry icons with display scaling** — PlotPy's icons (toolbar tools, item list, curve, marker and line styles, brush patterns, ...) were 16×16 pixel PNG images, which looked blurry with a display scaling greater than 100 % (e.g. 125 %, 150 %, 200 %). They are now SVG images, which remain sharp at any display scaling. Applications requesting a PlotPy icon by its former PNG name (e.g. `get_icon("csection.png")`) still get it with guidata 3.17.1 or later, whose `get_image_file_path` falls back to the SVG image with the same name. The notices of the original artwork are provided in `plotpy/data/icons/LICENSES.txt` (fixes [Issue #91](https://github.com/PlotPyStack/PlotPy/issues/91))
10+
* **Icon name conflicts** — Several PlotPy icons share their names with icons of guidata or of applications (e.g. `image.svg`, `histogram.svg`, `apply.svg`, `delete.svg`): with guidata 3.17.1, which gives precedence to the icons of applications and warns about ambiguous image names, PlotPy designates these icons explicitly (e.g. `"plotpy:image.svg"`, `"guidata:apply.svg"`), so that its widgets keep their icons in applications. The icons that were exact copies of guidata icons (editors, file types, ...) are no longer shipped by PlotPy, which uses those of guidata (fixes [Issue #93](https://github.com/PlotPyStack/PlotPy/issues/93))
1011
* **Image lock tool icon** — The "Lock" tool of transformable images showed the "not found" icon until an image was selected: it now shows the lock icon
1112

1213
⚡ Performance:

‎plotpy/builder/curvemarker.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def histogram(
627627
:py:class:`.HistogramItem` object
628628
"""
629629
basename = _("Histogram")
630-
histparam = HistogramParam(title=basename, icon="histogram.svg")
630+
histparam = HistogramParam(title=basename, icon="plotpy:histogram.svg")
631631
curveparam = CurveParam(_("Curve"), icon="curve.svg")
632632
curveparam.read_config(CONF, "histogram", "curve")
633633
if not title:

‎plotpy/builder/image.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def image(
218218

219219
assert isinstance(xdata, (tuple, list)) and len(xdata) == 2
220220
assert isinstance(ydata, (tuple, list)) and len(ydata) == 2
221-
param = ImageParam(title=_("Image"), icon="image.svg")
221+
param = ImageParam(title=_("Image"), icon="plotpy:image.svg")
222222
data, filename, title = self._get_image_data(
223223
data, filename, title, to_grayscale=True
224224
)
@@ -370,7 +370,7 @@ def maskedimage(
370370

371371
assert isinstance(xdata, (tuple, list)) and len(xdata) == 2
372372
assert isinstance(ydata, (tuple, list)) and len(ydata) == 2
373-
param = MaskedImageParam(title=_("Image"), icon="image.svg")
373+
param = MaskedImageParam(title=_("Image"), icon="plotpy:image.svg")
374374
data, filename, title = self._get_image_data(
375375
data, filename, title, to_grayscale=True
376376
)
@@ -468,7 +468,7 @@ def maskedxyimage(
468468
if isinstance(y, (list, tuple)):
469469
y = np.array(y)
470470

471-
param = MaskedXYImageParam(title=_("Image"), icon="image.svg")
471+
param = MaskedXYImageParam(title=_("Image"), icon="plotpy:image.svg")
472472
assert data.ndim == 2, "Data must have 2 dimensions"
473473

474474
self.__set_image_param(
@@ -533,7 +533,7 @@ def rgbimage(
533533
"""
534534
assert isinstance(xdata, (tuple, list)) and len(xdata) == 2
535535
assert isinstance(ydata, (tuple, list)) and len(ydata) == 2
536-
param = RGBImageParam(title=_("Image"), icon="image.svg")
536+
param = RGBImageParam(title=_("Image"), icon="plotpy:image.svg")
537537
data, filename, title = self._get_image_data(
538538
data, filename, title, to_grayscale=False
539539
)
@@ -593,7 +593,7 @@ def quadgrid(
593593
Returns:
594594
:py:class:`.QuadGridItem` object
595595
"""
596-
param = QuadGridParam(title=_("Image"), icon="image.svg")
596+
param = QuadGridParam(title=_("Image"), icon="plotpy:image.svg")
597597
self.__set_image_param(
598598
param,
599599
title,
@@ -682,7 +682,7 @@ def trimage(
682682
Returns:
683683
:py:class:`.TrImageItem` object
684684
"""
685-
param = TrImageParam(title=_("Image"), icon="image.svg")
685+
param = TrImageParam(title=_("Image"), icon="plotpy:image.svg")
686686
data, filename, title = self._get_image_data(
687687
data, filename, title, to_grayscale=True
688688
)
@@ -758,7 +758,7 @@ def xyimage(
758758
Returns:
759759
:py:class:`.XYImageItem` object
760760
"""
761-
param = XYImageParam(title=_("Image"), icon="image.svg")
761+
param = XYImageParam(title=_("Image"), icon="plotpy:image.svg")
762762
self.__set_image_param(
763763
param,
764764
title,

‎plotpy/data/icons/LICENSES.txt‎

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ SVG files replace the historical PNG icon resources. They were reconstructed
55
from those PNGs in 2026; the original artwork's notices and licenses remain.
66
The project code license does not replace these artwork licenses.
77

8+
The icons shared with guidata (e.g. editors, file types, Python logo) are
9+
provided by guidata: see guidata/data/icons/LICENSES.txt.
10+
811
Crystal Project
912
---------------
1013
Copyright (c) 2006-2007 Everaldo Coelho
@@ -17,39 +20,9 @@ Modification: SVG reconstruction of the historical PNG icons, 2026.
1720
Covered SVG files (relative to this directory):
1821
- arrow_down.svg
1922
- arrow_up.svg
20-
- cell_edit.svg
21-
- edit.svg
22-
- editors/edit.svg
23-
- editors/edit_add.svg
24-
- editors/editcopy.svg
25-
- editors/editdelete.svg
26-
- editors/editpaste.svg
27-
- editors/filesave.svg
28-
- editors/imshow.svg
29-
- editors/insert.svg
30-
- editors/plot.svg
31-
- editors/rename.svg
3223
- eraser.svg
33-
- exit.svg
34-
- fileclose.svg
35-
- fileimport.svg
36-
- filenew.svg
37-
- fileopen.svg
38-
- filesave.svg
39-
- filesaveas.svg
4024
- magnifier.svg
4125
- print.svg
42-
- save_all.svg
43-
44-
Python logo
45-
-----------
46-
Copyright (c) 2008 Python Software Foundation
47-
Source: https://www.python.org/community/logos/
48-
License: Python Software Foundation License Version 2 (PSF-2.0)
49-
Resource: python.svg
50-
Modification: SVG reconstruction of the historical PNG, 2026.
51-
The Python logo is a trademark of the Python Software Foundation.
52-
Trademark policy: https://www.python.org/psf/trademarks/
5326

5427
License texts retained from PlotPy's doc/intro/licenses.rst follow.
5528

‎plotpy/data/icons/apply.svg‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎plotpy/data/icons/arredit.svg‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎plotpy/data/icons/busy.svg‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎plotpy/data/icons/cell_edit.svg‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎plotpy/data/icons/copy.svg‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)