From 06bc18fb0fa4bac579b38e0881a391bf673ccb5e Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Wed, 9 Oct 2024 21:45:17 +0200 Subject: [PATCH] Properly scale link overlays --- src/Gui/Icons/LinkOverlay.xpm | 13 ------------- src/Gui/Icons/resource.qrc | 1 - src/Gui/Tree.cpp | 3 ++- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 src/Gui/Icons/LinkOverlay.xpm diff --git a/src/Gui/Icons/LinkOverlay.xpm b/src/Gui/Icons/LinkOverlay.xpm deleted file mode 100644 index a6d00724fa..0000000000 --- a/src/Gui/Icons/LinkOverlay.xpm +++ /dev/null @@ -1,13 +0,0 @@ -/* XPM */ -const char *xpm_link[] = { -"6 6 3 1", -" c None", -"# c #000000", -"a c #ffffff", -"######", -"aaaaa#", -"##aaa#", -"#aa#a#", -"aa##a#", -"##..##"}; - diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc index ebc3a8d345..ef055822d4 100644 --- a/src/Gui/Icons/resource.qrc +++ b/src/Gui/Icons/resource.qrc @@ -270,7 +270,6 @@ LinkArrayOverlay.svg LinkSubOverlay.svg LinkSubElement.svg - LinkOverlay.xpm LinkArrayOverlay.xpm LinkSubOverlay.xpm LinkSubElement.xpm diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 01d39314ff..5c1a6dc6a7 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -5417,9 +5417,10 @@ void DocumentObjectItem::testStatus(bool resetStatus, QIcon& icon1, QIcon& icon2 if (currentStatus & Status::External) { static QPixmap pxExternal; + int px = 12 * getMainWindow()->devicePixelRatioF(); if (pxExternal.isNull()) { pxExternal = Gui::BitmapFactory().pixmapFromSvg("LinkOverlay", - QSize(24, 24)); + QSize(px, px)); } pxOff = BitmapFactory().merge(pxOff, pxExternal, BitmapFactoryInst::BottomRight); pxOn = BitmapFactory().merge(pxOn, pxExternal, BitmapFactoryInst::BottomRight);