fixed a few icons and sizeHint functions. Removed unused SFListDelegate files from compilation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8571 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-29 16:08:17 +00:00
parent 18df09e032
commit ebc8bb072c
38 changed files with 266 additions and 227 deletions

View File

@ -245,8 +245,11 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
painter->restore();
}
QSize DLListDelegate::sizeHint(const QStyleOptionViewItem & /*option*/, const QModelIndex & /*index*/) const
QSize DLListDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
{
return QSize(50,17);
float w = QFontMetricsF(option.font).width(index.data(Qt::DisplayRole).toString());
int S = QFontMetricsF(option.font).height() ;
return QSize(w,S);
}

View File

@ -26,13 +26,13 @@
#include <retroshare/rstypes.h>
#include "RsAutoUpdatePage.h"
#include "ui_TransfersDialog.h"
#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
class DLListDelegate;
class ULListDelegate;
#include "ui_TransfersDialog.h"
#define IMAGE_TRANSFERS ":/icons/ktorrent_128.png"
class DLListDelegate;
class ULListDelegate;
class QStandardItemModel;
class QStandardItem;
class DetailsDialog;
@ -55,16 +55,16 @@ public:
/** Default Constructor */
TransfersDialog(QWidget *parent = 0);
~TransfersDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_TRANSFERS) ; } //MainPage
virtual QString pageName() const { return tr("File sharing") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent);
void activatePage(TransfersDialog::Page page) ;
TransfersDialog(QWidget *parent = 0);
~TransfersDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_TRANSFERS) ; } //MainPage
virtual QString pageName() const { return tr("File sharing") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent);
void activatePage(TransfersDialog::Page page) ;
virtual void updateDisplay() ; // derived from RsAutoUpdateWidget
@ -131,16 +131,16 @@ private slots:
void chunkProgressive();
void chunkStreaming();
void showDetailsDialog();
void updateDetailsDialog();
void collCreate();
void collModif();
void collView();
void collOpen();
void setShowDLSizeColumn(bool show);
void setShowDLCompleteColumn(bool show);
void showDetailsDialog();
void updateDetailsDialog();
void collCreate();
void collModif();
void collView();
void collOpen();
void setShowDLSizeColumn(bool show);
void setShowDLCompleteColumn(bool show);
void setShowDLDLSpeedColumn(bool show);
void setShowDLProgressColumn(bool show);
void setShowDLSourcesColumn(bool show);
@ -167,21 +167,21 @@ private:
ULListDelegate *ULDelegate;
/** Create the actions on the tray menu or menubar */
void createActions();
/** Defines the actions for the context menu */
QAction *showdownInfoAct;
QAction *playAct;
QAction *cancelAct;
QAction *forceCheckAct;
QAction *clearCompletedAct;
QAction *copyLinkAct;
QAction *pasteLinkAct;
QAction *rootIsNotDecoratedAct;
QAction *rootIsDecoratedAct;
QAction *pauseAct;
QAction *resumeAct;
QAction *openFolderAct;
void createActions();
/** Defines the actions for the context menu */
QAction *showdownInfoAct;
QAction *playAct;
QAction *cancelAct;
QAction *forceCheckAct;
QAction *clearCompletedAct;
QAction *copyLinkAct;
QAction *pasteLinkAct;
QAction *rootIsNotDecoratedAct;
QAction *rootIsDecoratedAct;
QAction *pauseAct;
QAction *resumeAct;
QAction *openFolderAct;
QAction *openFileAct;
QAction *previewFileAct;
// QAction *clearQueuedDwlAct;
@ -196,20 +196,20 @@ private:
QAction *queueBottomAct;
QAction *chunkRandomAct;
QAction *chunkProgressiveAct;
QAction *chunkStreamingAct;
QAction *detailsFileAct;
QAction *toggleShowCacheTransfersAct;
QAction *renameFileAct;
QAction *specifyDestinationDirectoryAct;
QAction *expandAllAct;
QAction *collapseAllAct;
QAction *collCreateAct;
QAction *collModifAct;
QAction *collViewAct;
QAction *collOpenAct;
/** Defines the actions for the header context menu */
QAction* showDLSizeAct;
QAction *chunkStreamingAct;
QAction *detailsFileAct;
QAction *toggleShowCacheTransfersAct;
QAction *renameFileAct;
QAction *specifyDestinationDirectoryAct;
QAction *expandAllAct;
QAction *collapseAllAct;
QAction *collCreateAct;
QAction *collModifAct;
QAction *collViewAct;
QAction *collOpenAct;
/** Defines the actions for the header context menu */
QAction* showDLSizeAct;
QAction* showDLCompleteAct;
QAction* showDLDLSpeedAct;
QAction* showDLProgressAct;

View File

@ -174,12 +174,14 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
QSize ULListDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
{
return QSize(50,17);
QVariant value = index.data(Qt::FontRole);
QFont fnt = value.isValid() ? qvariant_cast<QFont>(value) : option.font;
QFontMetrics fontMetrics(fnt);
const QString text = index.data(Qt::DisplayRole).toString();
QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1));
return textRect.size();
int S = QFontMetricsF(option.font).height() ;
return QSize(4*S,S);
//return QSize(50,17);
//QVariant value = index.data(Qt::FontRole);
//QFont fnt = value.isValid() ? qvariant_cast<QFont>(value) : option.font;
//QFontMetrics fontMetrics(fnt);
//const QString text = index.data(Qt::DisplayRole).toString();
//QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1));
//return textRect.size();
}

View File

@ -30,7 +30,7 @@
#include "util/TokenQueue.h"
#define IMAGE_IDDIALOG ":/images/user/friends32.png"
#define IMAGE_IDDIALOG ":/icons/friends_128.png"
namespace Ui {
class IdDialog;

View File

@ -115,18 +115,21 @@
#include <iomanip>
#include <unistd.h>
#define IMAGE_QUIT ":/icons/quit_128.png"
#define IMAGE_PREFERENCES ":/icons/system_128.png"
#define IMAGE_ABOUT ":/icons/information_128.png"
#define IMAGE_ADDFRIEND ":/icons/add_user_256.png"
#define IMAGE_RETROSHARE ":/icons/logo_128.png"
/* Images for toolbar icons */
//#define IMAGE_NETWORK2 ":/images/rs1.png"
//#define IMAGE_PEERS ":/images/groupchat.png"
//#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
#define IMAGE_FILES ":/images/fileshare32.png"
#define IMAGE_CHANNELS ":/images/channels.png"
#define IMAGE_FORUMS ":/images/konversation.png"
#define IMAGE_PREFERENCES ":/images/kcmsystem24.png"
#define IMAGE_CHAT ":/images/groupchat.png"
#define IMAGE_RETROSHARE ":/images/logo/logo_16.png"
#define IMAGE_ABOUT ":/images/informations_24x24.png"
#define IMAGE_STATISTIC ":/images/utilities-system-monitor.png"
//#define IMAGE_FILES ":/images/fileshare32.png"
//#define IMAGE_CHANNELS ":/images/channels.png"
//#define IMAGE_FORUMS ":/images/konversation.png"
//#define IMAGE_CHAT ":/images/groupchat.png"
//#define IMAGE_STATISTIC ":/images/utilities-system-monitor.png"
//#define IMAGE_MESSAGES ":/images/evolution.png"
#define IMAGE_BWGRAPH ":/images/ksysguard.png"
#define IMAGE_RSM32 ":/images/kdmconfig.png"
@ -136,11 +139,9 @@
#define IMAGE_COLOR ":/images/highlight.png"
#define IMAGE_GAMES ":/images/kgames.png"
#define IMAGE_PHOTO ":/images/lphoto.png"
#define IMAGE_ADDFRIEND ":/images/user/add_user24.png"
#define IMAGE_NEWRSCOLLECTION ":/images/library.png"
#define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png"
#define IMAGE_OPTIONS ":/images/settings.png"
#define IMAGE_QUIT ":/images/exit_24x24.png"
#define IMAGE_UNFINISHED ":/images/underconstruction.png"
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png"
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png"
@ -209,7 +210,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
QDesktopServices::setUrlHandler("https", this, "externalLinkActivated");
// Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/images/logo/logo_32.png")));
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/logo_128.png")));
/* Create all the dialogs of which we only want one instance */
_bandwidthGraph = new BandwidthGraph();
@ -354,65 +355,28 @@ void MainWindow::initStackedPage()
/* Create the Main pages and actions */
QActionGroup *grp = new QActionGroup(this);
//QAction *action;
//ui->stackPages->add(newsFeed = new NewsFeed(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_NEWSFEED), tr("News feed"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(newsFeed, action));
addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify);
//ui->stackPages->add(friendsDialog = new FriendsDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_PEERS), tr("Network"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(friendsDialog, action));
addPage(friendsDialog = new FriendsDialog(ui->stackPages), grp, &notify);
#ifdef RS_USE_CIRCLES
PeopleDialog *peopleDialog = NULL;
//ui->stackPages->add(peopleDialog = new PeopleDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_IDENTITY), tr("People"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(peopleDialog, action));
addPage(peopleDialog = new PeopleDialog(ui->stackPages), grp, &notify);
#endif
IdDialog *idDialog = NULL;
//ui->stackPages->add(idDialog = new IdDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_IDENTITY), tr("Itentities"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(idDialog, action));
addPage(idDialog = new IdDialog(ui->stackPages), grp, &notify);
#ifdef RS_USE_CIRCLES
CirclesDialog *circlesDialog = NULL;
//ui->stackPages->add(circlesDialog = new CirclesDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_CIRCLES ), tr("Circles"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(circlesDialog, action));
addPage(circlesDialog = new CirclesDialog(ui->stackPages), grp, &notify);
#endif
//ui->stackPages->add(transfersDialog = new TransfersDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_TRANSFERS), tr("File sharing"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(transfersDialog, action));
addPage(transfersDialog = new TransfersDialog(ui->stackPages), grp, &notify);
//ui->stackPages->add(chatLobbyDialog = new ChatLobbyWidget(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_CHATLOBBY), tr("Chat Lobbies"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(chatLobbyDialog, action));
addPage(chatLobbyDialog = new ChatLobbyWidget(ui->stackPages), grp, &notify);
//ui->stackPages->add(messagesDialog = new MessagesDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(messagesDialog, action));
addPage(messagesDialog = new MessagesDialog(ui->stackPages), grp, &notify);
//ui->stackPages->add(gxschannelDialog = new GxsChannelDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_GXSCHANNELS), tr("Channels"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(gxschannelDialog, action));
addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, &notify);
//ui->stackPages->add(gxsforumDialog = new GxsForumsDialog(ui->stackPages),
// action = createPageAction(QIcon(IMAGE_GXSFORUMS), tr("Forums"), grp));
//notify.push_back(QPair<MainPage*, QAction*>(gxsforumDialog, action));
addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, &notify);
addPage(postedDialog = new PostedDialog(ui->stackPages), grp, &notify);
#ifdef RS_USE_WIKI
@ -421,9 +385,6 @@ void MainWindow::initStackedPage()
#endif
#ifdef BLOGS
//ui->stackPages->add(blogsFeed = new BlogsDialog(ui->stackPages),
// createPageAction(QIcon(IMAGE_BLOGS), tr("Blogs"), grp));
//TODO: Add iconPixmap, pageName and helpText to BlogsDialog.h
addPage(blogsFeed = new BlogsDialog(ui->stackPages), grp, NULL);
#endif
@ -443,9 +404,6 @@ void MainWindow::initStackedPage()
MainPage *pluginPage = rsPlugins->plugin(i)->qt_page();
pluginPage->setIconPixmap(icon);
pluginPage->setPageName(QString::fromUtf8(rsPlugins->plugin(i)->getPluginName().c_str()));
//QAction *pluginAction = createPageAction(icon, QString::fromUtf8(rsPlugins->plugin(i)->getPluginName().c_str()), grp);
//ui->stackPages->add(pluginPage, pluginAction);
//notify.push_back(QPair<MainPage*, QAction*>(pluginPage, pluginAction));
addPage(pluginPage, grp, &notify);
}
else if(rsPlugins->plugin(i) == NULL)
@ -457,9 +415,6 @@ void MainWindow::initStackedPage()
#ifndef RS_RELEASE_VERSION
#ifdef PLUGINMGR
//ui->stackPages->add(pluginsPage = new PluginsPage(ui->stackPages),
// createPageAction(QIcon(IMAGE_PLUGINS), tr("Plugins"), grp));
//TODO: Add iconPixmap, pageName and helpText to PluginsPage.h
addPage(pluginsPage = new PluginsPage(ui->stackPages), grp, NULL);
#endif
#endif

View File

@ -439,7 +439,9 @@ void NetworkDialog::insertConnect()
#endif
item = new RSTreeWidgetItem(NULL, 0);
item -> setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless);
item -> setSizeHint(COLUMN_CHECK, QSize( 18,18 ) );
int S = QFontMetricsF(font()).height() ;
item -> setSizeHint(COLUMN_CHECK, QSize( S,S ) );
/* (1) Person */
item -> setText(COLUMN_PEERNAME, QString::fromUtf8(detail.name.c_str()));

View File

@ -28,7 +28,7 @@
#include "util/TokenQueue.h"
#include <retroshare-gui/RsAutoUpdatePage.h>
#define IMAGE_NEWSFEED ":/images/newsfeed/news-feed-32.png"
#define IMAGE_NEWSFEED ":/icons/plugins_128.png"
namespace Ui {
class NewsFeed;

View File

@ -6,21 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>571</width>
<width>598</width>
<height>376</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -50,7 +41,7 @@
</size>
</property>
<property name="pixmap">
<pixmap resource="images.qrc">:/images/newsfeed/news-feed-32.png</pixmap>
<pixmap resource="icons.qrc">:/icons/knews_128.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@ -100,8 +91,14 @@
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/64px_help.png</normaloff>:/images/64px_help.png</iconset>
<iconset resource="icons.qrc">
<normaloff>:/icons/information_128.png</normaloff>:/icons/information_128.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
@ -141,6 +138,7 @@
</customwidgets>
<resources>
<include location="images.qrc"/>
<include location="icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -37,12 +37,12 @@ bool PostedUserNotify::hasSetting(QString *name, QString *group)
QIcon PostedUserNotify::getIcon()
{
return QIcon(":/images/posted_32.png");
return QIcon(":/icons/posted_128.png");
}
QIcon PostedUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/posted_32_new.png") : QIcon(":/images/posted_32.png");
return hasNew ? QIcon(":/icons/posted_red_128.png") : QIcon(":/icons/posted_128.png");
}
void PostedUserNotify::iconClicked()

View File

@ -592,11 +592,12 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int
{
if (role == Qt::SizeHintRole)
{
int defw = 50;
int defh = 21;
int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ;
int defh = QFontMetricsF(QWidget().font()).height();
if (section < 2)
{
defw = 200;
defw = 200/16.0*defh;
}
return QSize(defw, defh);
}
@ -637,11 +638,12 @@ QVariant FlatStyle_RDM::headerData(int section, Qt::Orientation orientation, int
{
if (role == Qt::SizeHintRole)
{
int defw = 50;
int defh = 21;
int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ;
int defh = QFontMetricsF(QWidget().font()).height();
if (section < 2)
{
defw = 200;
defw = defh*200/16.0;
}
return QSize(defw, defh);
}

View File

@ -94,7 +94,7 @@ QIcon ChatLobbyUserNotify::getIcon()
QIcon ChatLobbyUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/chat_red24.png") : QIcon(":/images/chat_32.png");
return hasNew ? QIcon(":/icons/chat_red_128.png") : QIcon(":/icons/chat_128.png");
}
unsigned int ChatLobbyUserNotify::getNewCount()

View File

@ -79,7 +79,7 @@ QIcon ChatUserNotify::getIcon()
QIcon ChatUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/user/friends24_notify.png") : QIcon(":/images/logo/logo_32.png");
return hasNew ? QIcon(":/icons/logo_128.png") : QIcon(":/icons/logo_128.png");
}
unsigned int ChatUserNotify::getNewCount()

View File

@ -38,7 +38,7 @@ void NewsFeedUserNotify::newsFeedChanged(int count)
QIcon NewsFeedUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/newsfeed/news-feed-notify-32.png") : QIcon(":/images/newsfeed/news-feed-32.png");
return hasNew ? QIcon(":/icons/knews_red_128.png") : QIcon(":/icons/knews_128.png");
}
unsigned int NewsFeedUserNotify::getNewCount()

View File

@ -42,7 +42,7 @@ QIcon GxsChannelUserNotify::getIcon()
QIcon GxsChannelUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/channels_new.png") : QIcon(":/images/channels.png");
return hasNew ? QIcon(":/icons/channels_red_128.png") : QIcon(":/icons/channels_128.png");
}
void GxsChannelUserNotify::iconClicked()

View File

@ -38,12 +38,12 @@ bool GxsForumUserNotify::hasSetting(QString *name, QString *group)
QIcon GxsForumUserNotify::getIcon()
{
return QIcon(":/images/konversation16.png");
return QIcon(":/icons/konversation_128.png");
}
QIcon GxsForumUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/forums_new.png") : QIcon(":/images/konversation.png");
return hasNew ? QIcon(":/icons/konversation_red_128.png") : QIcon(":/icons/konversation_128.png");
}
void GxsForumUserNotify::iconClicked()

View File

@ -7,18 +7,29 @@
<file>icons/blank_green_128.png</file>
<file>icons/browsable_blue_128.png</file>
<file>icons/browsable_green_128.png</file>
<file>icons/channels_128.png</file>
<file>icons/channels_red_128.png</file>
<file>icons/chat_128.png</file>
<file>icons/chat_red_128.png</file>
<file>icons/circles_128.png</file>
<file>icons/friends_128.png</file>
<file>icons/help_128.png</file>
<file>icons/information_128.png</file>
<file>icons/internet_128.png</file>
<file>icons/knews_128.png</file>
<file>icons/knews_red_128.png</file>
<file>icons/konversation_128.png</file>
<file>icons/konversation_red_128.png</file>
<file>icons/ktorrent_128.png</file>
<file>icons/logo_128.png</file>
<file>icons/mail_128.png</file>
<file>icons/mail_old_128.png</file>
<file>icons/mail_red_128.png</file>
<file>icons/newsfeed128.png</file>
<file>icons/plugins_128.png</file>
<file>icons/posted_128.png</file>
<file>icons/posted_red_128.png</file>
<file>icons/quit_128.png</file>
<file>icons/security_high_128.png</file>
<file>icons/security_low_128.png</file>
<file>icons/security_medium_128.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -41,12 +41,12 @@ bool MessageUserNotify::hasSetting(QString *name, QString *group)
QIcon MessageUserNotify::getIcon()
{
return QIcon(":/images/inbox_22.png");
return QIcon(":/icons/mail_128.png");
}
QIcon MessageUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/images/message_new.png") : QIcon(":/images/evolution.png");
return hasNew ? QIcon(":/icons/mail_red_128.png") : QIcon(":/icons/mail_128.png");
}
unsigned int MessageUserNotify::getNewCount()

View File

@ -289,7 +289,7 @@ bool NotifyQt::askForPluginConfirmation(const std::string& plugin_file_name, con
text += "</UL>" ;
dialog.setText(text) ;
dialog.setWindowIcon(QIcon(":/images/logo/logo_32.png"));
dialog.setWindowIcon(QIcon(":/icons/logo_128.png"));
dialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No) ;
int ret = dialog.exec();

View File

@ -106,7 +106,13 @@ bool AppearancePage::save(QString &errmsg)
break;
case 3:
Settings->setToolButtonSize(32);
}
break;
case 4:
Settings->setToolButtonSize(64);
break;
case 5:
Settings->setToolButtonSize(128);
}
switch (ui.cmboListItemSize->currentIndex())
{
case 0:
@ -121,7 +127,13 @@ bool AppearancePage::save(QString &errmsg)
break;
case 3:
Settings->setListItemIconSize(32);
}
break;
case 4:
Settings->setListItemIconSize(64);
break;
case 5:
Settings->setListItemIconSize(128);
}
/* Set to new style */
Rshare::setStyle(ui.cmboStyle->currentText());
@ -183,7 +195,13 @@ void AppearancePage::load()
break;
case 32:
ui.cmboTollButtonsSize->setCurrentIndex(3);
}
break;
case 64:
ui.cmboTollButtonsSize->setCurrentIndex(4);
break;
case 128:
ui.cmboTollButtonsSize->setCurrentIndex(5);
}
switch (Settings->getListItemIconSize())
{
case 8:
@ -198,7 +216,13 @@ void AppearancePage::load()
break;
case 32:
ui.cmboListItemSize->setCurrentIndex(3);
}
break;
case 64:
ui.cmboListItemSize->setCurrentIndex(4);
break;
case 128:
ui.cmboListItemSize->setCurrentIndex(5);
}
ui.checkBoxStatusCompactMode->setChecked(Settings->valueFromGroup("StatusBar", "CompactMode", QVariant(false)).toBool());
ui.checkBoxHideSoundStatus->setChecked(Settings->valueFromGroup("StatusBar", "HideSound", QVariant(false)).toBool());

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>598</width>
<width>1160</width>
<height>567</height>
</rect>
</property>
@ -301,29 +301,29 @@
</property>
<layout class="QGridLayout" name="gridLayoutToolListStyle">
<item row="2" column="0">
<widget class="QComboBox" name="cmboTollButtonsStyle">
<item>
<property name="text">
<string>Icon Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Beside Icon</string>
</property>
</item>
<item>
<property name="text">
<string>Text Under Icon</string>
</property>
</item>
</widget>
</item>
<widget class="QComboBox" name="cmboTollButtonsStyle">
<item>
<property name="text">
<string>Icon Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Beside Icon</string>
</property>
</item>
<item>
<property name="text">
<string>Text Under Icon</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelToolButtonStyle">
<property name="sizePolicy">
@ -351,53 +351,73 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QComboBox" name="cmboTollButtonsSize">
<item>
<property name="text">
<string>Icon Size = 8x8</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 16x16</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 24x24</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 32x32</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmboListItemSize">
<widget class="QComboBox" name="cmboTollButtonsSize">
<item>
<property name="text">
<string>Icon Size = 8x8</string>
</property>
</item>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 16x16</string>
</property>
</item>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 24x24</string>
</property>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 32x32</string>
</property>
</item>
</widget>
</item>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 64x64</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 128x128</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmboListItemSize">
<item>
<property name="text">
<string>Icon Size = 8x8</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 16x16</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 24x24</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 32x32</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 64x64</string>
</property>
</item>
<item>
<property name="text">
<string>Icon Size = 128x128</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -252,6 +252,10 @@ int RshareSettings::getToolButtonSize()
return 24;
case 32:
return 32;
case 64:
return 64 ;
case 128:
return 128 ;
}
}
@ -272,7 +276,14 @@ void RshareSettings::setToolButtonSize(int size)
break;
case 32:
setValue(SETTING_TOOLBUTTONSIZE, 32);
}
break;
case 64:
setValue(SETTING_TOOLBUTTONSIZE, 64);
break;
case 128:
setValue(SETTING_TOOLBUTTONSIZE, 128);
break;
}
}
/** Gets the list item icon's size.*/
@ -290,7 +301,11 @@ int RshareSettings::getListItemIconSize()
return 24;
case 32:
return 32;
}
case 64:
return 64;
case 128:
return 128;
}
}
/** Sets the list item icon's size.*/
@ -310,7 +325,14 @@ void RshareSettings::setListItemIconSize(int size)
break;
case 32:
setValue(SETTING_LISTITEMICONSIZE, 32);
}
break ;
case 64:
setValue(SETTING_LISTITEMICONSIZE, 64);
break ;
case 128:
setValue(SETTING_LISTITEMICONSIZE, 128);
break ;
}
}
static QString getKeyForLastDir(RshareSettings::enumLastDir type)

View File

@ -92,7 +92,7 @@ static void displayWarningAboutDSAKeys()
msgBox.setInformativeText(QObject::tr("DSA keys are not yet supported by this version of RetroShare. All these nodes will be unusable. We're very sorry for that."));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.setWindowIcon(QIcon(":/images/logo/logo_32.png"));
msgBox.setWindowIcon(QIcon(":/icons/logo_128.png"));
msgBox.exec();
}
@ -185,7 +185,7 @@ int main(int argc, char *argv[])
msgBox.setInformativeText(QObject::tr("Choose between:<br><ul><li><b>Ok</b> to copy the existing keyring from gnupg (safest bet), or </li><li><b>Close without saving</b> to start fresh with an empty keyring (you will be asked to create a new PGP key to work with RetroShare, or import a previously saved pgp keypair). </li><li><b>Cancel</b> to quit and forge a keyring by yourself (needs some PGP skills)</li></ul>"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Discard | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.setWindowIcon(QIcon(":/images/logo/logo_32.png"));
msgBox.setWindowIcon(QIcon(":/icons/logo_128.png"));
int ret = msgBox.exec();
@ -214,7 +214,7 @@ int main(int argc, char *argv[])
displayWarningAboutDSAKeys();
QMessageBox mb(QMessageBox::Critical, QObject::tr("RetroShare"), "", QMessageBox::Ok);
mb.setWindowIcon(QIcon(":/images/logo/logo_32.png"));
mb.setWindowIcon(QIcon(":/icons/logo_128.png"));
switch (initResult)
{

View File

@ -341,7 +341,7 @@ HEADERS += rshare.h \
gui/SharedFilesDialog.h \
gui/ShareManager.h \
gui/ShareDialog.h \
gui/SFListDelegate.h \
# gui/SFListDelegate.h \
gui/SoundManager.h \
gui/HelpDialog.h \
gui/LogoBar.h \
@ -700,7 +700,7 @@ SOURCES += main.cpp \
gui/SharedFilesDialog.cpp \
gui/ShareManager.cpp \
gui/ShareDialog.cpp \
gui/SFListDelegate.cpp \
# gui/SFListDelegate.cpp \
gui/SoundManager.cpp \
gui/MessagesDialog.cpp \
gui/im_history/ImHistoryBrowser.cpp \

View File

@ -112,7 +112,7 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, const QString &dir)
#ifndef __APPLE__
/* set default window icon */
setWindowIcon(QIcon(":/images/logo/logo_32.png"));
setWindowIcon(QIcon(":/icons/logo_128.png"));
#endif