mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 03:52:39 -04:00
Enabled Antialiasing for QGraphicsView
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7578 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
77a367bc8a
commit
9f12ebaddf
3 changed files with 8 additions and 4 deletions
|
@ -26,6 +26,8 @@ CircleWidget::CircleWidget(QString name/*=QString()*/
|
||||||
|
|
||||||
ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||||
|
|
||||||
|
ui->graphicsView->setRenderHints( QPainter::Antialiasing | QPainter::SmoothPixmapTransform );
|
||||||
|
|
||||||
setIsCurrent(false);
|
setIsCurrent(false);
|
||||||
setIsSelected(false);
|
setIsSelected(false);
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
#include <gui/gxs/GxsIdDetails.h>
|
#include <gui/gxs/GxsIdDetails.h>
|
||||||
#include "IdentityItem.h"
|
#include "IdentityItem.h"
|
||||||
|
|
||||||
#define IMAGE_MAKEFRIEND ""
|
#define IMAGE_MAKEFRIEND ":/images/user/add_user16.png"
|
||||||
|
#define IMAGE_CHAT ":/images/chat_24.png"
|
||||||
|
|
||||||
IdentityItem *IdentityItem::_selected_node = NULL ;
|
IdentityItem *IdentityItem::_selected_node = NULL ;
|
||||||
|
|
||||||
|
@ -70,6 +71,8 @@ void IdentityItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||||
painter->setBrush(Qt::lightGray);
|
painter->setBrush(Qt::lightGray);
|
||||||
//painter->drawEllipse(-7, -7, 20, 20);
|
//painter->drawEllipse(-7, -7, 20, 20);
|
||||||
|
|
||||||
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
QRadialGradient gradient(-10, -IMG_SIZE/3.0, IMG_SIZE*1.5);
|
QRadialGradient gradient(-10, -IMG_SIZE/3.0, IMG_SIZE*1.5);
|
||||||
gradient.setColorAt(0.0f,Qt::lightGray) ;
|
gradient.setColorAt(0.0f,Qt::lightGray) ;
|
||||||
gradient.setColorAt(1.0f,Qt::darkGray) ;
|
gradient.setColorAt(1.0f,Qt::darkGray) ;
|
||||||
|
@ -118,7 +121,7 @@ void IdentityItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||||
QMenu contextMnu ;
|
QMenu contextMnu ;
|
||||||
|
|
||||||
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Peer details" ), this, SLOT(peerDetails()) );
|
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Peer details" ), this, SLOT(peerDetails()) );
|
||||||
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Chat this peer" ), this, SLOT(distantChat()) );
|
contextMnu.addAction(QIcon(IMAGE_CHAT), QObject::tr( "Chat this peer" ), this, SLOT(distantChat()) );
|
||||||
contextMnu.exec(event->screenPos());
|
contextMnu.exec(event->screenPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,4 +142,3 @@ void IdentityItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
QGraphicsItem::mouseReleaseEvent(event);
|
QGraphicsItem::mouseReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>Suggestions</p></body></html></string>
|
<string>People you may know on RetroShare</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue