From 643379aec7428c3b86d6750f9ba14fb4f55ddcfd Mon Sep 17 00:00:00 2001 From: defnax Date: Fri, 23 Jan 2009 01:58:56 +0000 Subject: [PATCH] * replaced toText in MessagesDialog QTextEdit with QTextBrowser to get use a scrollbar * update little bit ProfileView(added function for load a image to picture label, added a Button for Edit Profile) * set context menu icon for Connect To Friend * Fixed OnlineToaster's Picture Label Layout * set for Make Friend a Header Image and Text git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@939 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/emoticons/emotes.acs | 2 +- retroshare-gui/src/gui/MessagesDialog.cpp | 4 +- retroshare-gui/src/gui/MessagesDialog.ui | 92 ++-- retroshare-gui/src/gui/PeersDialog.cpp | 33 +- retroshare-gui/src/gui/PeersDialog.h | 74 ++-- .../src/gui/connect/ConnectDialog.ui | 36 +- retroshare-gui/src/gui/images.qrc | 3 + .../src/gui/images/connect_friend.png | Bin 0 -> 3472 bytes retroshare-gui/src/gui/profile/ProfileEdit.ui | 20 +- .../src/gui/profile/ProfileView.cpp | 11 +- retroshare-gui/src/gui/profile/ProfileView.h | 4 +- retroshare-gui/src/gui/profile/ProfileView.ui | 410 ++++++++++-------- .../src/gui/toaster/OnlineToaster.ui | 75 +--- 13 files changed, 412 insertions(+), 352 deletions(-) create mode 100755 retroshare-gui/src/gui/images/connect_friend.png diff --git a/retroshare-gui/src/emoticons/emotes.acs b/retroshare-gui/src/emoticons/emotes.acs index d92ff48ad..ea41db12a 100755 --- a/retroshare-gui/src/emoticons/emotes.acs +++ b/retroshare-gui/src/emoticons/emotes.acs @@ -14,7 +14,7 @@ "8-)":"emoticons/cool.png"; "=))|:-j|:-J":"emoticons/rotfl.png"; "(B)|(b)":"emoticons/beer.png"; -"(@)|/cat|/mm":"emoticons/cat.png"; +"(@)":"emoticons/cat.png"; "(P)|(p)":"emoticons/camera.png"; "(C)|(c)":"emoticons/coffee.png"; "*JOKINGLY*|:))|:-))":"emoticons/laugh.png"; diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp index ec9a60bdf..218d0afa7 100644 --- a/retroshare-gui/src/gui/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/MessagesDialog.cpp @@ -441,6 +441,7 @@ void MessagesDialog::insertMessages() case 0: default: msgbox = RS_MSG_INBOX; + break; } @@ -471,6 +472,7 @@ void MessagesDialog::insertMessages() //std::cerr << std::endl; continue; } + /* make a widget per friend */ QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0); @@ -524,7 +526,7 @@ void MessagesDialog::insertMessages() QFont qf = item->font(i); qf.setBold(true); item->setFont(i, qf); - item -> setIcon(2, (QIcon(":/images/message-mail.png"))); + item -> setIcon(2, (QIcon(":/images/message-mail.png"))); //std::cerr << "Setting Item BOLD!" << std::endl; } diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/MessagesDialog.ui index 380fdfc78..2a59fb812 100644 --- a/retroshare-gui/src/gui/MessagesDialog.ui +++ b/retroshare-gui/src/gui/MessagesDialog.ui @@ -6,7 +6,7 @@ 0 0 759 - 520 + 557 @@ -505,7 +505,7 @@ Qt::DefaultContextMenu - + @@ -526,7 +526,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">New Message</p></body></html> - + @@ -542,7 +542,7 @@ p, li { white-space: pre-wrap; } - + @@ -563,7 +563,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">reply to selected message</p></body></html> - + @@ -576,7 +576,7 @@ p, li { white-space: pre-wrap; } - + @@ -601,7 +601,7 @@ p, li { white-space: pre-wrap; } - + @@ -622,7 +622,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">remove selected message</p></body></html> - + @@ -635,7 +635,7 @@ p, li { white-space: pre-wrap; } - + @@ -666,12 +666,12 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + 541 20 @@ -679,7 +679,7 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal @@ -723,7 +723,8 @@ p, li { white-space: pre-wrap; } Inbox - :/images/folder-inbox.png + + :/images/folder-inbox.png:/images/folder-inbox.png @@ -731,7 +732,8 @@ p, li { white-space: pre-wrap; } Outbox - :/images/folder-outbox.png + + :/images/folder-outbox.png:/images/folder-outbox.png @@ -739,7 +741,8 @@ p, li { white-space: pre-wrap; } Draft - :/images/folder-draft.png + + :/images/folder-draft.png:/images/folder-draft.png @@ -747,7 +750,8 @@ p, li { white-space: pre-wrap; } Sent - :/images/folder-sent.png + + :/images/folder-sent.png:/images/folder-sent.png @@ -779,7 +783,8 @@ p, li { white-space: pre-wrap; } - :/images/attachment.png + + :/images/attachment.png:/images/attachment.png @@ -824,7 +829,7 @@ p, li { white-space: pre-wrap; } QSizePolicy::Preferred - + 20 40 @@ -874,7 +879,7 @@ p, li { white-space: pre-wrap; } - + @@ -931,7 +936,7 @@ p, li { white-space: pre-wrap; } - + @@ -988,7 +993,7 @@ p, li { white-space: pre-wrap; } - + @@ -1045,29 +1050,14 @@ p, li { white-space: pre-wrap; } - - - - - 2 - 0 - - - - - 0 - 12 - - + + 16777215 - 10 + 22 - - - @@ -1088,22 +1078,10 @@ p, li { white-space: pre-wrap; } - + 0 - - 0 - - - 0 - - - 0 - - - 6 - - + 6 @@ -1145,7 +1123,8 @@ p, li { white-space: pre-wrap; } - :/images/edit_remove24.png + + :/images/edit_remove24.png:/images/edit_remove24.png @@ -1156,7 +1135,7 @@ p, li { white-space: pre-wrap; } Qt::Horizontal - + 351 20 @@ -1176,7 +1155,8 @@ p, li { white-space: pre-wrap; } - :/images/down.png + + :/images/down.png:/images/down.png diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 05b7a30a6..f974e336e 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -35,6 +35,8 @@ #include "msgs/ChanMsgDialog.h" #include "ChatDialog.h" #include "connect/ConfCertDialog.h" +#include "profile/ProfileView.h" + #include "gui/Preferences/rsharesettings.h" @@ -65,6 +67,7 @@ #define IMAGE_PEERINFO ":/images/peerdetails_16x16.png" #define IMAGE_CHAT ":/images/chat.png" #define IMAGE_MSG ":/images/message-mail.png" +#define IMAGE_CONNECT ":/images/connect_friend.png" /* Images for Status icons */ #define IMAGE_ONLINE ":/images/user/identity24.png" #define IMAGE_OFFLINE ":/images/user/identityoffline24.png" @@ -139,7 +142,7 @@ PeersDialog::PeersDialog(QWidget *parent) ui.fontsButton->setIcon(QIcon(QString(":/images/fonts.png"))); _currentColor = Qt::black; - QPixmap pxm(24,24); + QPixmap pxm(16,16); pxm.fill(_currentColor); ui.colorChatButton->setIcon(pxm); @@ -185,11 +188,14 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point ) msgAct = new QAction(QIcon(IMAGE_MSG), tr( "Message Friend" ), this ); connect( msgAct , SIGNAL( triggered() ), this, SLOT( msgfriend() ) ); - connectfriendAct = new QAction( tr( "Connect To Friend" ), this ); + connectfriendAct = new QAction(QIcon(IMAGE_CONNECT), tr( "Connect To Friend" ), this ); connect( connectfriendAct , SIGNAL( triggered() ), this, SLOT( connectfriend() ) ); configurefriendAct = new QAction(QIcon(IMAGE_PEERINFO), tr( "Peer Details" ), this ); connect( configurefriendAct , SIGNAL( triggered() ), this, SLOT( configurefriend() ) ); + + profileviewAct = new QAction(QIcon(IMAGE_PEERINFO), tr( "Profile View" ), this ); + connect( profileviewAct , SIGNAL( triggered() ), this, SLOT( viewprofile() ) ); exportfriendAct = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Export Friend" ), this ); connect( exportfriendAct , SIGNAL( triggered() ), this, SLOT( exportfriend() ) ); @@ -203,6 +209,7 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point ) contextMnu.addAction( msgAct); contextMnu.addSeparator(); contextMnu.addAction( configurefriendAct); + //contextMnu.addAction( profileviewAct); contextMnu.addSeparator(); contextMnu.addAction( connectfriendAct); contextMnu.addAction( exportfriendAct); @@ -919,7 +926,7 @@ void PeersDialog::setColor() QRgb color = QColorDialog::getRgba(ui.lineEdit->textColor().rgba(), &ok, this); if (ok) { _currentColor = QColor(color); - QPixmap pxm(24,24); + QPixmap pxm(16,16); pxm.fill(_currentColor); ui.colorChatButton->setIcon(pxm); } @@ -1068,3 +1075,23 @@ void PeersDialog::addSmileys() ui.lineEdit->setText(ui.lineEdit->toHtml() + qobject_cast(sender())->toolTip().split("|").first()); } +/* GUI stuff -> don't do anything directly with Control */ +void PeersDialog::viewprofile() +{ + /* display Dialog */ + + QTreeWidgetItem *c = getCurrentPeer(); + + + static ProfileView *profileview = new ProfileView(); + + + if (!c) + return; + + /* set the Id */ + std::string id = getPeerRsCertId(c); + + profileview -> setPeerId(id); + profileview -> show(); +} diff --git a/retroshare-gui/src/gui/PeersDialog.h b/retroshare-gui/src/gui/PeersDialog.h index a69ef94cc..2bab4dd53 100644 --- a/retroshare-gui/src/gui/PeersDialog.h +++ b/retroshare-gui/src/gui/PeersDialog.h @@ -17,37 +17,37 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. - ****************************************************************/ - + ****************************************************************/ + #ifndef _PEERSDIALOG_H -#define _PEERSDIALOG_H - +#define _PEERSDIALOG_H + #include #include "chat/PopupChatDialog.h" - -#include "mainpage.h" -#include "ui_PeersDialog.h" - + +#include "mainpage.h" +#include "ui_PeersDialog.h" + class QFont; class QAction; class QTextEdit; class QTextCharFormat; class ChatDialog; -class PeersDialog : public MainPage -{ - Q_OBJECT - -public: - /** Default Constructor */ - PeersDialog(QWidget *parent = 0); +class PeersDialog : public MainPage +{ + Q_OBJECT + +public: + /** Default Constructor */ + PeersDialog(QWidget *parent = 0); /** Default Destructor */ PopupChatDialog *getPrivateChat(std::string id, std::string name, uint chatflags); void clearOldChats(); - void loadEmoticonsgroupchat(); + void loadEmoticonsgroupchat(); void insertPeers(); @@ -63,13 +63,13 @@ public slots: void smileyWidgetgroupchat(); void addSmileys(); - void on_actionClearChat_triggered(); - void displayInfoChatMenu(const QPoint& pos); - - -private slots: - - /** Create the context popup menu and it's submenus */ + void on_actionClearChat_triggered(); + void displayInfoChatMenu(const QPoint& pos); + + +private slots: + + /** Create the context popup menu and it's submenus */ void peertreeWidgetCostumPopupMenu( QPoint point ); /** Export friend in Friends Dialog */ @@ -80,7 +80,8 @@ private slots: void chatfriend(); void msgfriend(); - void configurefriend(); + void configurefriend(); + void viewprofile(); /** RsServer Friend Calls */ void allowfriend(); @@ -99,8 +100,8 @@ private slots: void getFont(); void underline(); - -private: + +private: /* Worker Functions */ /* (1) Update Display */ @@ -111,12 +112,13 @@ private: ChatDialog *chatDialog; - /** Define the popup menus for the Context menu */ + /** Define the popup menus for the Context menu */ QMenu* contextMnu; - /** Defines the actions for the context menu */ + /** Defines the actions for the context menu */ QAction* chatAct; QAction* msgAct; QAction* connectfriendAct; + QAction* profileviewAct; QAction* configurefriendAct; QAction* exportfriendAct; QAction* removefriendAct; @@ -124,17 +126,17 @@ private: QTreeWidget *peertreeWidget; QColor _currentColor; - bool _underline; + bool _underline; QHash smileys; std::map chatDialogs; QFont mCurrentFont; /* how the text will come out */ - - /** Qt Designer generated object */ - Ui::PeersDialog ui; -}; - -#endif - + + /** Qt Designer generated object */ + Ui::PeersDialog ui; +}; + +#endif + diff --git a/retroshare-gui/src/gui/connect/ConnectDialog.ui b/retroshare-gui/src/gui/connect/ConnectDialog.ui index 4cdd5d59b..cf81c69d7 100644 --- a/retroshare-gui/src/gui/connect/ConnectDialog.ui +++ b/retroshare-gui/src/gui/connect/ConnectDialog.ui @@ -6,7 +6,7 @@ 0 0 462 - 380 + 475 @@ -505,11 +505,31 @@ 0 0 462 - 359 + 453 + + + + 0 + 70 + + + + background-image: url(:/images/addfriendlabel.png) + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600; color:#000000;"> Make Friend</span></p></body></html> + + + + Peer Details @@ -598,14 +618,14 @@ - + AUTH CODE: - + @@ -615,7 +635,7 @@ - + Qt::Horizontal @@ -631,7 +651,7 @@ - + 6 @@ -697,9 +717,9 @@ 0 - 359 + 453 462 - 21 + 22 diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index 5f6d3653e..4d1432dfc 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -139,6 +139,7 @@ images/folder-draft24-pressed.png images/folder-draft24.png images/folder-inbox.png + images/folder-inbox-new.png images/folder-outbox.png images/folder-sent.png images/folder_doments.png @@ -167,6 +168,7 @@ images/informations_24x24.png images/invite-friend24.png images/invitefriendlabel.png + images/connect_friend.png images/kbackgammon.png images/kblogger.png images/kcmsystem24.png @@ -279,6 +281,7 @@ images/user/identity32.png images/user/add_user16.png images/user/personal64.png + images/user/kuser24.png images/up.png images/underconstruction.png images/user.png diff --git a/retroshare-gui/src/gui/images/connect_friend.png b/retroshare-gui/src/gui/images/connect_friend.png new file mode 100755 index 0000000000000000000000000000000000000000..3549e6d83daa8cc78302a34b9888c5ac50d1b441 GIT binary patch literal 3472 zcmV;B4R7*^P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709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ir>QbBL4$YnCe{SyW zBDHDL=i=l2;Cp}X^YT3m5rJVC_$oC0c1mheR7rS7sC5jaZa}P%HSanH0m#KQV1L_J`&<0AQbSiXkxMK@*+GW_{1C_TWec)5WwX` zD}U(m{LMQQAI(8zkP9~F3Z&gK+?RfU*5H6@+5n@~7VXyohs)Im3OHC|mq5h8Vw{KF z6by&c4G+7BFo7FW>Pfh5KUu#3@=)K-9f6frhXtKan{nxCHBzSZNZuQU04^a&$cH3r zA9lYC9enbjV;#WwZY=Y;XM2_^Yy)*F?l#*(eXfsPd|;$N~xxVXHH9~@Q%AaOgup8)_e6lK~oOYy(}0000 - Form + Profile Edit Qt::LeftToRight @@ -58,7 +58,7 @@ - + @@ -140,7 +140,8 @@ Add Entry - :/images/add_24x24.png + + :/images/add_24x24.png:/images/add_24x24.png @@ -149,7 +150,7 @@ Qt::Horizontal - + 71 28 @@ -166,7 +167,8 @@ Move - :/images/down.png + + :/images/down.png:/images/down.png @@ -176,7 +178,8 @@ Move - :/images/up.png + + :/images/up.png:/images/up.png @@ -185,7 +188,7 @@ Qt::Horizontal - + 71 28 @@ -202,7 +205,8 @@ Close Editor - :/images/close_normal.png + + :/images/close_normal.png:/images/close_normal.png diff --git a/retroshare-gui/src/gui/profile/ProfileView.cpp b/retroshare-gui/src/gui/profile/ProfileView.cpp index eca6a76fb..3dcc8c9b2 100644 --- a/retroshare-gui/src/gui/profile/ProfileView.cpp +++ b/retroshare-gui/src/gui/profile/ProfileView.cpp @@ -53,6 +53,8 @@ ProfileView::ProfileView(QWidget *parent) // connect up the buttons. connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(closeView())); + connect(ui.profileditButton, SIGNAL(clicked()), this, SLOT(profileEdit())); + /* Hide platform specific features */ #ifdef Q_WS_WIN @@ -241,7 +243,14 @@ void ProfileView::update() /* Image Context Menu */ void ProfileView::selectimagefile() { - return; + QString fileName = QFileDialog::getOpenFileName(this, "Load File", + QDir::homePath(), + "Pictures (*.png *.xpm *.jpg)"); + if(!fileName.isEmpty()) + { + picture = QPixmap(fileName).scaled(108,108, Qt::IgnoreAspectRatio); + ui.photoLabel->setPixmap(picture); + } } void ProfileView::clearimage() diff --git a/retroshare-gui/src/gui/profile/ProfileView.h b/retroshare-gui/src/gui/profile/ProfileView.h index f82e5ae76..654501937 100644 --- a/retroshare-gui/src/gui/profile/ProfileView.h +++ b/retroshare-gui/src/gui/profile/ProfileView.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. - ****************************************************************/ + ****************************************************************/ #ifndef _PROFILE_VIEW_H @@ -76,6 +76,8 @@ private: std::string pId; bool mIsOwnId; + QPixmap picture; + /** Qt Designer generated object */ Ui::ProfileView ui; diff --git a/retroshare-gui/src/gui/profile/ProfileView.ui b/retroshare-gui/src/gui/profile/ProfileView.ui index 3be45b51d..f19c65e47 100644 --- a/retroshare-gui/src/gui/profile/ProfileView.ui +++ b/retroshare-gui/src/gui/profile/ProfileView.ui @@ -10,30 +10,111 @@ - Form + Profile View Qt::LeftToRight - + - - - Qt::Vertical - - - - + + + + + + + Rs ID + + + + + + + true + + + + + + + + + + + Name + + + + + + + true + + + + + + + + + + + + 128 + 128 + + + + + 128 + 128 + + + + Qt::CustomContextMenu + + + border-image: url(:/images/avatar_background.png); + + + + + + :/images/user/personal64.png + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + - + - Rs ID + Last Post: - + true @@ -41,184 +122,148 @@ - - - - - - Name - - - - - - - true - - - - - - - - - - - - 128 - 128 - - - - - 128 - 128 - - - - Qt::CustomContextMenu - - - - - - :/images/ddeny.png - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Last Post: - - - - - - - true - - - - - - - - - - 16777215 - 128 - - - - - - - - - - - - - - 75 - true - + + + + 16777215 + 128 + - - Profile - - - - - - - Qt::CustomContextMenu - - - false - - - - Category - - - - - Thoughts - - - - - - - - - - 75 - true - - - - Favourite Files - - - - - - - Qt::CustomContextMenu - - - - Name - - - - - Size - - - - - Hash - - - - - - - + + - + + + + -1 + + + 0 + + + + + + 75 + true + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; vertical-align:sub;">Profile</span></p></body></html> + + + + + + + Qt::Horizontal + + + + 368 + 20 + + + + + + + + Edit Profile + + + + + + + :/images/user/kuser24.png:/images/user/kuser24.png + + + + 24 + 24 + + + + + + + + Qt::CustomContextMenu + + + false + + + + Category + + + + + Thoughts + + + + + + + + + + 0 + + + + + + 75 + true + + + + Favourite Files + + + + + + + Qt::CustomContextMenu + + + + Name + + + + + Size + + + + + Hash + + + + + + + Qt::Horizontal - + 241 28 @@ -226,7 +271,7 @@ - + Qt::RightToLeft @@ -235,7 +280,8 @@ Close Profile - :/images/close_normal.png + + :/images/close_normal.png:/images/close_normal.png diff --git a/retroshare-gui/src/gui/toaster/OnlineToaster.ui b/retroshare-gui/src/gui/toaster/OnlineToaster.ui index 415098c8a..85ebb8373 100644 --- a/retroshare-gui/src/gui/toaster/OnlineToaster.ui +++ b/retroshare-gui/src/gui/toaster/OnlineToaster.ui @@ -5,27 +5,15 @@ 0 0 - 330 + 388 168 - + 0 - - 0 - - - 0 - - - 0 - - - 0 - - + 0 @@ -37,42 +25,18 @@ QFrame::Raised - + 0 - - 0 - - - 0 - - - 0 - - - 0 - - + 0 - + 0 - - 0 - - - 0 - - - 0 - - - 0 - - + 0 @@ -90,7 +54,8 @@ - :/images/close-down.png + + :/images/close-down.png:/images/close-down.png @@ -108,7 +73,7 @@ Qt::Horizontal - + 225 22 @@ -126,10 +91,7 @@ 4 - - 0 - - + 0 @@ -147,7 +109,7 @@ - border-image: url(:/images/avatar_background.png); + border-image: url(:/images/avatar_background.png); @@ -155,6 +117,9 @@ :/images/user/personal64.png + + Qt::AlignCenter + @@ -162,7 +127,7 @@ Qt::Horizontal - + 121 20 @@ -182,7 +147,7 @@ Qt::Horizontal - + 121 20 @@ -202,7 +167,7 @@ Qt::Horizontal - + 81 20 @@ -222,7 +187,7 @@ Qt::Horizontal - + 131 20 @@ -237,7 +202,7 @@ Qt::Vertical - + 384 61