replace person default icon with node icon

This commit is contained in:
csoler 2022-04-01 22:09:24 +02:00
parent df69963d40
commit 36427be489
4 changed files with 51 additions and 31 deletions

View File

@ -55,6 +55,7 @@
#define IMAGE_NETWORK2 ":/icons/png/netgraph2.png"
#define IMAGE_PEERS ":/icons/png/digital-key.png"
#define IMAGE_IDENTITY ":/images/identity/identities_32.png"
#define DEFAULT_NODE_AVATAR ":/icons/svg/network2.svg"
/******
* #define FRIENDS_DEBUG 1
@ -88,8 +89,9 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage()));
ui.avatar->setDefaultAvatar(DEFAULT_NODE_AVATAR);
ui.avatar->setOwnId();
ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatar->setFrameType(AvatarWidget::NO_FRAME);
ui.tabWidget->setTabPosition(QTabWidget::North);
#ifdef RS_EMBEDED_FRIEND_SERVER

View File

@ -208,7 +208,7 @@
</font>
</property>
<property name="text">
<string notr="true">Nickname (Location)</string>
<string notr="true">Profile (Location)</string>
</property>
</widget>
</item>

View File

@ -156,7 +156,7 @@ void AvatarWidget::setGxsId(const RsGxsId &id)
void AvatarWidget::setOwnId()
{
mFlag.isOwnId = true;
setToolTip(tr("Click to change your avatar"));
setToolTip(tr("Click to change your node avatar"));
setId(ChatId(rsPeers->getOwnId()));
}
@ -274,15 +274,14 @@ void AvatarWidget::updateAvatar(const QString &peerId)
void AvatarWidget::refreshAvatarImage()
{
if (mGxsId.isNull()==false)
if (!mGxsId.isNull())
{
QPixmap avatar;
AvatarDefs::getAvatarFromGxsId(mGxsId, avatar, defaultAvatar);
setPixmap(avatar);
return;
}
if (mId.isNotSet())
else if (mId.isNotSet())
{
QPixmap avatar(defaultAvatar);
setPixmap(avatar);
@ -291,7 +290,7 @@ void AvatarWidget::refreshAvatarImage()
else if (mFlag.isOwnId && mId.isPeerId())
{
QPixmap avatar;
AvatarDefs::getOwnAvatar(avatar);
AvatarDefs::getOwnAvatar(avatar,defaultAvatar);
setPixmap(avatar);
return;
}

View File

@ -1,12 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="700pt"
height="700pt"
version="1.1"
viewBox="0 0 700 700"
id="svg150"
inkscape:version="1.0.2 (1.0.2+r75+1)">
inkscape:version="1.0.2 (1.0.2+r75+1)"
sodipodi:docname="network2.svg">
<metadata
id="metadata56">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
@ -26,7 +44,8 @@
inkscape:window-x="0"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="g148" />
inkscape:current-layer="g148"
inkscape:document-rotation="0" />
<defs
id="defs68">
<symbol
@ -187,49 +206,49 @@
<g
id="g148">
<path
d="m 103.42489,460.50293 c 16.73154,0 32.48058,4.92271 47.24273,12.79749 l 66.46193,-83.40562 c -16.23813,-14.74019 -25.12477,-48.48347 -25.12477,-72.10923 0,-23.624 6.89316,-45.27948 19.68345,-63.97339 l -75.78979,-68.89645 c -12.79749,10.82721 -29.52956,16.73154 -47.24272,16.73154 -42.31967,0 -76.77229,-34.45261 -76.77229,-76.77228 0,-42.31967 34.45262,-76.77229 76.77229,-76.77229 42.31967,0 76.77228,34.45262 76.77228,76.77229 0,18.7027 -6.89316,36.41586 -18.70269,50.1955 l 73.8195,67.91571 c 20.67298,-23.624 51.18328,-39.36689 85.62887,-39.36689 51.18328,0 94.49248,34.45262 109.25287,80.71284 l 108.27213,-34.45262 c 0,-3.93405 -0.98179,-6.89316 -0.98179,-10.82721 0,-47.24273 38.38615,-86.61664 86.61665,-86.61664 48.2305,0 86.61664,38.38614 86.61664,86.61664 0,48.2305 -38.38614,86.61665 -86.61664,86.61665 -38.38614,0 -71.84923,-25.58901 -82.67609,-61.02237 l -108.27213,34.45262 c 0.98179,5.9045 2.63794,12.83533 1.97046,18.7027 -4.71693,41.46281 -21.20601,76.3897 -48.86324,93.81932 l 37.04684,69.56258 c 6.89316,-1.97046 13.77929,-3.93406 20.67298,-3.93406 35.43336,0 63.97339,28.54003 63.97339,63.97339 0,35.43337 -28.54003,63.97339 -63.97339,63.97339 -35.43336,0 -63.97339,-28.54002 -63.97339,-63.97339 0,-22.63622 11.80901,-42.31966 29.52956,-54.13606 l -37.04685,-68.14352 c -14.76108,6.89316 -35.78312,12.04456 -52.51554,12.04456 -34.45262,0 -47.56177,-6.85466 -79.20681,-30.2503 l -63.50915,78.48256 c 22.63623,17.71317 36.41587,44.28995 36.41587,74.80201 0,52.16579 -43.3092,95.47323 -95.47323,95.47323 -52.16579,0 -95.47323,-43.3092 -95.47323,-95.47323 -0.007,-52.17281 43.29514,-93.51701 95.4662,-93.51701 z M 87.67515,61.8776 c -34.45262,0 -62.01014,27.55928 -62.01014,62.01014 0,34.45262 27.55928,62.01014 62.01014,62.01014 34.45262,0 62.01014,-27.55928 62.01014,-62.01014 C 149.67829,89.43512 122.11898,61.8776 87.67515,61.8776 Z m 520.67358,248.03354 c 39.36689,0 71.84923,-32.48059 71.84923,-71.84923 0,-39.36689 -32.48058,-71.84923 -71.84923,-71.84923 -39.36688,0 -71.84922,32.48058 -71.84922,71.84923 0,39.36689 32.48058,71.84923 71.84922,71.84923 z M 380.00039,542.19652 c 0,27.55928 21.65373,49.213 49.21301,49.213 27.55928,0 49.213,-21.65372 49.213,-49.213 0,-27.55928 -21.65372,-49.21301 -49.213,-49.21301 -27.55928,0 -49.21301,21.65373 -49.21301,49.21301 z M 305.19311,417.20076 c 55.11681,0 99.40851,-44.28995 99.40851,-99.40851 0,-55.11857 -44.28994,-99.40851 -99.40851,-99.40851 -55.11856,0 -99.40851,44.28994 -99.40851,99.40851 0,54.12903 44.28995,99.40851 99.40851,99.40851 z m -201.77332,219.49 c 44.28995,0 80.71285,-36.41587 80.71285,-80.71284 0,-44.28995 -36.41587,-80.71285 -80.71285,-80.71285 -44.28994,0 -80.71284,36.41587 -80.71284,80.71285 0,44.29697 36.41587,80.71284 80.71284,80.71284 z"
d="m 151.38448,437.05007 c 13.83262,0 26.85296,4.06979 39.05741,10.58018 l 54.94667,-68.95468 c -13.4247,-12.18629 -20.77163,-40.08318 -20.77163,-59.61551 0,-19.53089 5.69885,-37.43432 16.27308,-52.8893 l -62.65838,-56.95939 c -10.58018,8.95128 -24.41324,13.83262 -39.0574,13.83262 -34.98732,0 -63.470648,-28.48332 -63.470648,-63.47064 0,-34.98732 28.483328,-63.47065 63.470648,-63.47065 34.98732,0 63.47064,28.48333 63.47064,63.47065 0,15.46225 -5.69884,30.10641 -15.46224,41.49858 l 61.02946,56.14857 c 17.09116,-19.53089 42.31521,-32.54615 70.79273,-32.54615 42.31521,0 78.12062,28.48333 90.32361,66.72846 l 89.5128,-28.48333 c 0,-3.25243 -0.81169,-5.69884 -0.81169,-8.95128 0,-39.0574 31.73533,-71.60935 71.60937,-71.60935 39.87404,0 71.60936,31.73532 71.60936,71.60935 0,39.87404 -31.73532,71.60937 -71.60936,71.60937 -31.73532,0 -59.40056,-21.15543 -68.35155,-50.44958 l -89.5128,28.48333 c 0.81169,4.88148 2.18089,10.61147 1.62906,15.46225 -3.89967,34.27893 -17.53184,63.15435 -40.39715,77.5641 l 30.62807,57.5101 c 5.69884,-1.62906 11.39188,-3.25244 17.09116,-3.25244 29.29414,0 52.8893,23.59515 52.8893,52.88929 0,29.29415 -23.59516,52.8893 -52.8893,52.8893 -29.29414,0 -52.8893,-23.59515 -52.8893,-52.8893 0,-18.71424 9.76297,-34.98731 24.41324,-44.75639 l -30.62808,-56.33691 c -12.20356,5.69885 -29.5833,9.95771 -43.41664,9.95771 -28.48333,0 -39.32118,-5.66701 -65.48337,-25.0091 l -52.50549,64.88459 c 18.71426,14.64417 30.10642,36.61623 30.10642,61.84174 0,43.1275 -35.8054,78.93145 -78.93144,78.93145 -43.1275,0 -78.93145,-35.80541 -78.93145,-78.93145 -0.0058,-43.13329 35.79378,-77.31416 78.92563,-77.31416 z M 138.36356,107.49095 c -28.48333,0 -51.266208,22.78433 -51.266208,51.2662 0,28.48333 22.784328,51.2662 51.266208,51.2662 28.48332,0 51.2662,-22.78433 51.2662,-51.2662 -0.006,-28.48332 -22.79015,-51.2662 -51.2662,-51.2662 z m 430.46117,205.05901 c 32.54614,0 59.40056,-26.85297 59.40056,-59.40057 0,-32.54614 -26.85296,-59.40056 -59.40056,-59.40056 -32.54614,0 -59.40056,26.85296 -59.40056,59.40056 0,32.54615 26.85297,59.40057 59.40056,59.40057 z M 380.04024,504.58935 c 0,22.78433 17.90199,40.68631 40.68632,40.68631 22.78433,0 40.68631,-17.90198 40.68631,-40.68631 0,-22.78433 -17.90198,-40.68632 -40.68631,-40.68632 -22.78433,0 -40.68632,17.90199 -40.68632,40.68632 z m -61.8461,-103.33888 c 45.56722,0 82.1849,-36.61623 82.1849,-82.18489 0,-45.56868 -36.61622,-82.1849 -82.1849,-82.1849 -45.56866,0 -82.18489,36.61622 -82.18489,82.1849 0,44.75058 36.61623,82.18489 82.18489,82.18489 z M 151.38026,582.71142 c 36.61623,0 66.72847,-30.10642 66.72847,-66.72845 0,-36.61623 -30.10642,-66.72846 -66.72847,-66.72846 -36.61622,0 -66.728452,30.10642 -66.728452,66.72846 0,36.62203 30.106422,66.72845 66.728452,66.72845 z"
id="path70"
sodipodi:nodetypes="cccsccssssccsccssssccsccssssccsccsscccssscsssssssssssssssssssss"
style="stroke-width:1.75761" />
style="stroke-width:1.45308" />
<ellipse
style="opacity:0.71459;fill:#15cab1;fill-opacity:1;stroke:#252525;stroke-width:0;stroke-dasharray:none;stroke-opacity:0.817326"
id="path979"
cx="-608.30371"
cy="238.09892"
rx="71.919525"
ry="71.867867"
cx="-568.78754"
cy="253.17999"
rx="59.458679"
ry="59.41597"
transform="scale(-1,1)" />
<ellipse
style="opacity:0.71459;fill:#15cabf;fill-opacity:1;stroke:#252525;stroke-width:0;stroke-dasharray:none;stroke-opacity:0.817326"
id="path979-7"
cx="-103.51494"
cy="556.1593"
rx="80.814491"
ry="80.837357"
cx="-151.45892"
cy="516.13293"
rx="66.812492"
ry="66.831398"
transform="scale(-1,1)" />
<ellipse
style="opacity:0.71459;fill:#005ac5;fill-opacity:1;stroke:#252525;stroke-width:0;stroke-dasharray:none;stroke-opacity:0.817326"
id="path979-7-5"
cx="-305.12009"
cy="317.7475"
rx="99.595657"
ry="99.742958"
cx="-318.13379"
cy="319.02856"
rx="82.339615"
ry="82.461395"
transform="scale(-1,1)" />
<ellipse
style="opacity:0.71459;fill:#15ca70;fill-opacity:1;stroke:#252525;stroke-width:0;stroke-dasharray:none;stroke-opacity:0.817326"
id="path979-7-5-6"
cx="-87.688393"
cy="123.92677"
rx="62.166546"
ry="62.011829"
cx="-138.3745"
cy="158.78943"
rx="51.395512"
ry="51.267601"
transform="scale(-1,1)" />
<ellipse
style="opacity:0.71459;fill:#15ca70;fill-opacity:1;stroke:#252525;stroke-width:0;stroke-dasharray:none;stroke-opacity:0.817326"
id="path979-7-5-6-9"
cx="-429.49048"
cy="541.53131"
rx="49.552204"
ry="49.913685"
cx="-420.95563"
cy="504.0394"
rx="40.96674"
ry="41.265591"
transform="scale(-1,1)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB