Properly scale link overlays

This commit is contained in:
Furgo
2024-10-09 21:45:17 +02:00
committed by Yorik van Havre
parent 42a61ca889
commit 06bc18fb0f
3 changed files with 2 additions and 15 deletions

View File

@@ -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#",
"##..##"};

View File

@@ -270,7 +270,6 @@
<file>LinkArrayOverlay.svg</file>
<file>LinkSubOverlay.svg</file>
<file>LinkSubElement.svg</file>
<file>LinkOverlay.xpm</file>
<file>LinkArrayOverlay.xpm</file>
<file>LinkSubOverlay.xpm</file>
<file>LinkSubElement.xpm</file>

View File

@@ -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);