-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
This commit is contained in:
defnax 2008-08-06 21:53:41 +00:00
parent 48293b5d6e
commit 107e94c7cb
5 changed files with 80 additions and 120 deletions

View File

@ -499,10 +499,7 @@
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" >
<property name="horizontalSpacing" >
<number>1</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>1</number>
</property>
<item row="0" column="0" >
@ -514,22 +511,10 @@
<layout class="QHBoxLayout" >
<item>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
@ -559,7 +544,7 @@ p, li { white-space: pre-wrap; }
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>271</width>
<height>20</height>
@ -595,6 +580,12 @@ p, li { white-space: pre-wrap; }
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeView" name="localDirTreeView" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</property>
@ -618,6 +609,12 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
<widget class="QTreeView" name="remoteDirTreeView" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>4</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</property>

View File

@ -434,49 +434,37 @@
<string>RetroShare</string>
</property>
<property name="windowIcon" >
<iconset resource="images.qrc" >:/images/rstray3.png</iconset>
<iconset resource="images.qrc" >
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property>
<property name="styleSheet" >
<string>.QWidget {
<string notr="true" >.QWidget {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 lightgray, stop:1 darkgray);
}</string>
</property>
<widget class="QWidget" name="centralwidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>239</width>
<height>404</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
@ -484,7 +472,7 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
@ -495,7 +483,7 @@
<item row="0" column="1" >
<widget class="QToolButton" name="toolButton" >
<property name="styleSheet" >
<string>QToolButton{
<string notr="true" >QToolButton{
border-image: url(:/images/avatar_background.png);
}
@ -505,7 +493,8 @@ border-image: url(:/images/avatar_background.png);
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/retrosharelogo1.png</iconset>
<iconset resource="images.qrc" >
<normaloff>:/images/retrosharelogo1.png</normaloff>:/images/retrosharelogo1.png</iconset>
</property>
<property name="iconSize" >
<size>
@ -523,7 +512,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
@ -535,22 +524,10 @@ border-image: url(:/images/avatar_background.png);
</item>
<item row="1" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>0</number>
</property>
<item row="2" column="0" >
@ -600,22 +577,10 @@ border-image: url(:/images/avatar_background.png);
</item>
<item row="2" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>0</number>
</property>
<item row="0" column="0" >
@ -633,7 +598,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
@ -645,22 +610,10 @@ border-image: url(:/images/avatar_background.png);
</item>
<item row="3" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="2" >
@ -668,7 +621,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>71</width>
<height>20</height>
@ -681,7 +634,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>61</width>
<height>20</height>
@ -700,22 +653,10 @@ border-image: url(:/images/avatar_background.png);
</item>
<item row="4" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="2" >
@ -723,7 +664,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
@ -736,7 +677,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
@ -747,7 +688,7 @@ border-image: url(:/images/avatar_background.png);
<item row="0" column="1" >
<widget class="QPushButton" name="createaccountButton" >
<property name="text" >
<string>Create a Account</string>
<string>You have a Profile?</string>
</property>
</widget>
</item>
@ -758,7 +699,7 @@ border-image: url(:/images/avatar_background.png);
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>

View File

@ -22,6 +22,7 @@
<file>images/FileTypeProgram.png</file>
<file>images/FileTypeVideo.png</file>
<file>images/fonts.png</file>
<file>images/folder16.png</file>
<file>images/RetroShare16.png</file>
<file>images/add-friend24.png</file>
<file>images/add-share24.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

View File

@ -3,7 +3,7 @@
#include "rsfiles.h"
#include <QtGui>
#include <QIcon>
#include <iostream>
#include <sstream>
#include <math.h>
@ -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,6 +224,27 @@ 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();
}
}
/*************