mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -25,6 +25,8 @@ CircleWidget::CircleWidget(QString name/*=QString()*/
|
||||
ui->graphicsView->setEnabled(false);
|
||||
|
||||
ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
|
||||
ui->graphicsView->setRenderHints( QPainter::Antialiasing | QPainter::SmoothPixmapTransform );
|
||||
|
||||
setIsCurrent(false);
|
||||
setIsSelected(false);
|
||||
|
@ -13,7 +13,8 @@
|
||||
#include <gui/gxs/GxsIdDetails.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 ;
|
||||
|
||||
@ -69,6 +70,8 @@ void IdentityItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(Qt::lightGray);
|
||||
//painter->drawEllipse(-7, -7, 20, 20);
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
QRadialGradient gradient(-10, -IMG_SIZE/3.0, IMG_SIZE*1.5);
|
||||
gradient.setColorAt(0.0f,Qt::lightGray) ;
|
||||
@ -118,7 +121,7 @@ void IdentityItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
QMenu contextMnu ;
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -139,4 +142,3 @@ void IdentityItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
QGraphicsItem::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Suggestions</p></body></html></string>
|
||||
<string>People you may know on RetroShare</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user