From 107e94c7cbab9f4477fa2bbfad55b6deebe646ef Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 6 Aug 2008 21:53:41 +0000 Subject: [PATCH] -removed the background colors for Files TreeView. -added folder icons for folders in Files. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@666 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/SharedFilesDialog.ui | 35 +++-- retroshare-gui/src/gui/StartDialog.ui | 131 +++++------------- retroshare-gui/src/gui/images.qrc | 1 + retroshare-gui/src/gui/images/folder16.png | Bin 0 -> 611 bytes retroshare-gui/src/rsiface/RemoteDirModel.cpp | 33 ++++- 5 files changed, 80 insertions(+), 120 deletions(-) create mode 100644 retroshare-gui/src/gui/images/folder16.png diff --git a/retroshare-gui/src/gui/SharedFilesDialog.ui b/retroshare-gui/src/gui/SharedFilesDialog.ui index c185eb81d..51ab8260d 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.ui +++ b/retroshare-gui/src/gui/SharedFilesDialog.ui @@ -499,10 +499,7 @@ Qt::NoContextMenu - - 1 - - + 1 @@ -514,22 +511,10 @@ - + 0 - - 0 - - - 0 - - - 0 - - - 6 - - + 6 @@ -559,7 +544,7 @@ p, li { white-space: pre-wrap; } Qt::Horizontal - + 271 20 @@ -595,6 +580,12 @@ p, li { white-space: pre-wrap; } Qt::Horizontal + + + 0 + 0 + + Qt::CustomContextMenu @@ -618,6 +609,12 @@ p, li { white-space: pre-wrap; } + + + 4 + 0 + + Qt::CustomContextMenu diff --git a/retroshare-gui/src/gui/StartDialog.ui b/retroshare-gui/src/gui/StartDialog.ui index a436e516e..e47281700 100644 --- a/retroshare-gui/src/gui/StartDialog.ui +++ b/retroshare-gui/src/gui/StartDialog.ui @@ -434,49 +434,37 @@ RetroShare - :/images/rstray3.png + + :/images/rstray3.png:/images/rstray3.png - .QWidget { + .QWidget { background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 lightgray, stop:1 darkgray); } + + + 0 + 0 + 239 + 404 + + - - 0 - - - 0 - - - 0 - - - 0 - 0 + + 0 + - + 0 - - 0 - - - 0 - - - 0 - - - 6 - - + 6 @@ -484,7 +472,7 @@ Qt::Horizontal - + 40 20 @@ -495,7 +483,7 @@ - QToolButton{ + QToolButton{ border-image: url(:/images/avatar_background.png); } @@ -505,7 +493,8 @@ border-image: url(:/images/avatar_background.png); - :/images/retrosharelogo1.png + + :/images/retrosharelogo1.png:/images/retrosharelogo1.png @@ -523,7 +512,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 40 20 @@ -535,22 +524,10 @@ border-image: url(:/images/avatar_background.png); - + 6 - - 6 - - - 6 - - - 6 - - - 0 - - + 0 @@ -600,22 +577,10 @@ border-image: url(:/images/avatar_background.png); - + 6 - - 6 - - - 6 - - - 6 - - - 0 - - + 0 @@ -633,7 +598,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 40 20 @@ -645,22 +610,10 @@ border-image: url(:/images/avatar_background.png); - + 0 - - 0 - - - 0 - - - 0 - - - 6 - - + 6 @@ -668,7 +621,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 71 20 @@ -681,7 +634,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 61 20 @@ -700,22 +653,10 @@ border-image: url(:/images/avatar_background.png); - + 9 - - 9 - - - 9 - - - 9 - - - 6 - - + 6 @@ -723,7 +664,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 40 20 @@ -736,7 +677,7 @@ border-image: url(:/images/avatar_background.png); Qt::Horizontal - + 40 20 @@ -747,7 +688,7 @@ border-image: url(:/images/avatar_background.png); - Create a Account + You have a Profile? @@ -758,7 +699,7 @@ border-image: url(:/images/avatar_background.png); Qt::Vertical - + 20 40 diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index c2331b6b6..fc26ea12d 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -22,6 +22,7 @@ images/FileTypeProgram.png images/FileTypeVideo.png images/fonts.png + images/folder16.png images/RetroShare16.png images/add-friend24.png images/add-share24.png diff --git a/retroshare-gui/src/gui/images/folder16.png b/retroshare-gui/src/gui/images/folder16.png new file mode 100644 index 0000000000000000000000000000000000000000..66704bdf38ae48dd970e73e4fe0993404e30d73e GIT binary patch literal 611 zcmV-p0-XJcP)q5|KYg?11sZEPF&HXcH<{TI84K4jc2WBy6=KSXSzG0Mz;Ih$ZG{$}3pA3TFei)YT z6^kR2@QV|F{`P`rvoke_$eFpgxVW&fv9Z_fcGEbHogoqtk%3{^jahm|q`9(6A_D)s zTPu~y(`vOka>! z)}C5tL;x7%fS3SJ80l32%nZ--j*0?gmcb;@&Vih}nu1}tV32dL89_54$u0*--ptIy zEYj4%DM6qF`vbZdz|1-aD5Zu<`f&#B1&A!;-!b6KE6mN!eW=&#*G}eOi~(DR%}yWt z1B1<80%J}9rY9!6samaYdu+@fEtj8^N+mewKtza>1WGB)PJ3WS*xHSeBnFO7XK)?B zO{G*uL|OnONiqyjYYnXxdWQsE_S^E8orCProuyydPSihKW54j`RER&< z*SCws;>yDO{QE|uvDzEACuV-pY&LH_fB9;hSkqp&{T)khU$@`QECYbL=sQPI xgjTBs5kVM+s8lMLdhqz6INJaH - +#include #include #include #include @@ -152,11 +152,11 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent) return QVariant(); } - if (role == Qt::BackgroundRole) - { + /*if (role == Qt::BackgroundRole) + {*/ /*** colour entries based on rank/age/count **/ /*** rank (0-10) ***/ - uint32_t r = details.rank; + /*uint32_t r = details.rank; if (r > 10) r = 10; r = 200 + r * 5; /* 0->250 */ @@ -196,7 +196,7 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent) * */ - uint32_t g = (uint32_t) log2 ( 1.0 + ( details.age / 100 ) ) * 4; + /*uint32_t g = (uint32_t) log2 ( 1.0 + ( details.age / 100 ) ) * 4; if (g > 250) g = 250; g = 250 - g; @@ -224,7 +224,28 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent) { return QVariant(); } - } + }*/ + + if (role == Qt::DecorationRole) + { + + if (details.type == DIR_TYPE_PERSON) + { + //setData(QIcon(":/images/user/identity16.png")); + QIcon icon1(":/images/user/identity16.png"); + return icon1; + } + else if (details.type == DIR_TYPE_DIR) + { + //setData(QIcon(":/images/folder_green16.png")); + QIcon icon(":/images/folder16.png"); + return icon; + } + else + { + return QVariant(); + } + } /************* Qt::EditRole