Skip to content

Commit 10b479b

Browse files
Merge pull request #96 from PlotPyStack/fix/95-std-icons-hidpi
Sharp Save as, Help, Open and Save items icons with display scaling
2 parents 8892978 + 85071c8 commit 10b479b

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎doc/release_notes/release_2.12.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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))
1010
* **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))
1111
* **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
12+
* **Blurry Save as, Help, Open and Save items icons** — With a display scaling greater than 100 % (e.g. 150 %, 200 %), the icons of these tools were blurry, as their standard Qt icon was frozen to a 16-pixel image upscaled to the toolbar icon size: they now keep all the resolutions of the icon and are shown at the same size as the other toolbar icons (fixes [Issue #95](https://github.com/PlotPyStack/PlotPy/issues/95))
1213

1314
⚡ Performance:
1415

‎plotpy/tools/item.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def __init__(
307307
super().__init__(
308308
manager,
309309
_("Save items"),
310-
get_std_icon("DialogSaveButton", 16),
310+
get_std_icon("DialogSaveButton"),
311311
toolbar_id=toolbar_id,
312312
)
313313

‎plotpy/tools/misc.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, manager, toolbar_id=DefaultToolbarID):
3232
super().__init__(
3333
manager,
3434
_("Save as..."),
35-
get_std_icon("DialogSaveButton", 16),
35+
get_std_icon("DialogSaveButton"),
3636
toolbar_id=toolbar_id,
3737
)
3838

@@ -257,7 +257,7 @@ def __init__(self, manager, toolbar_id=DefaultToolbarID):
257257
super().__init__(
258258
manager,
259259
_("Help"),
260-
get_std_icon("DialogHelpButton", 16),
260+
get_std_icon("DialogHelpButton"),
261261
toolbar_id=toolbar_id,
262262
)
263263

@@ -327,7 +327,7 @@ def __init__(
327327
self, manager, title=_("Open..."), formats="*.*", toolbar_id=DefaultToolbarID
328328
):
329329
super().__init__(
330-
manager, title, get_std_icon("DialogOpenButton", 16), toolbar_id=toolbar_id
330+
manager, title, get_std_icon("DialogOpenButton"), toolbar_id=toolbar_id
331331
)
332332
self.formats = formats
333333
self.directory = ""

0 commit comments

Comments
 (0)