mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fexed Icon size of the group tree
* Fixed icon size of the group tree to display icon complete. Added for channel adminstrator clickable to contact easy. * Format Channel Description when contains links or emote * Added setting for disable Emoteicon
This commit is contained in:
parent
590f5f6944
commit
e7085eeb75
@ -143,7 +143,7 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||
/* Initialize display button */
|
||||
initDisplayMenu(ui->displayButton);
|
||||
|
||||
ui->treeWidget->setIconSize(QSize(S*1.6,S*1.6));
|
||||
ui->treeWidget->setIconSize(QSize(S*1.8,S*1.8));
|
||||
}
|
||||
|
||||
GroupTreeWidget::~GroupTreeWidget()
|
||||
@ -405,7 +405,7 @@ QTreeWidgetItem *GroupTreeWidget::addCategoryItem(const QString &name, const QIc
|
||||
|
||||
int S = QFontMetricsF(font).height();
|
||||
|
||||
item->setSizeHint(COLUMN_NAME, QSize(S*1.1, S*1.1));
|
||||
item->setSizeHint(COLUMN_NAME, QSize(S*1.9, S*1.9));
|
||||
item->setForeground(COLUMN_NAME, QBrush(textColorCategory()));
|
||||
nameLabel->setTextColor(textColorCategory());
|
||||
item->setData(COLUMN_DATA, ROLE_COLOR, GROUPTREEWIDGET_COLOR_CATEGORY);
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/feeds/SubFileItem.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
@ -259,6 +261,8 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
rsGxsChannels->getChannelAutoDownload(group.mMeta.mGroupId,autoDownload);
|
||||
setAutoDownload(autoDownload);
|
||||
|
||||
RetroShareLink link;
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) {
|
||||
ui->feedToolButton->setEnabled(true);
|
||||
|
||||
@ -274,10 +278,24 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
ui->infoLastPost->setText(tr("Never"));
|
||||
else
|
||||
ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
||||
QString formatDescription = QString::fromUtf8(group.mDescription.c_str());
|
||||
|
||||
unsigned int formatFlag = RSHTML_FORMATTEXT_EMBED_LINKS;
|
||||
|
||||
// embed smileys ?
|
||||
if (Settings->valueFromGroup(QString("ChannelPostsWidget"), QString::fromUtf8("Emoteicons_ChannelDecription"), true).toBool()) {
|
||||
formatFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
}
|
||||
|
||||
formatDescription = RsHtml().formatText(NULL, formatDescription, formatFlag);
|
||||
|
||||
ui->infoDescription->setText(formatDescription);
|
||||
|
||||
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
||||
|
||||
link = RetroShareLink::createMessage(group.mMeta.mAuthorId, "");
|
||||
ui->infoAdministrator->setText(link.toHtml());
|
||||
|
||||
QString distrib_string ( "[unknown]" );
|
||||
|
||||
switch(group.mMeta.mCircleType)
|
||||
|
@ -460,14 +460,17 @@
|
||||
<string notr="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'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html></string>
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; 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:8pt;">Description</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openLinks">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -489,6 +492,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
|
@ -35,6 +35,8 @@ ChannelPage::ChannelPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Channel) ;
|
||||
|
||||
connect(ui.loadThreadCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateLoadThread())) ;
|
||||
connect(ui.emoteicon_checkBox,SIGNAL(toggled(bool)),this,SLOT(updateEmotes())) ;
|
||||
|
||||
}
|
||||
|
||||
void ChannelPage::updateLoadThread()
|
||||
@ -52,4 +54,15 @@ void ChannelPage::load()
|
||||
{
|
||||
whileBlocking(ui.loadThreadCheckBox)->setChecked(Settings->getChannelLoadThread());
|
||||
ui.groupFrameSettingsWidget->loadSettings(GroupFrameSettings::Channel);
|
||||
|
||||
Settings->beginGroup(QString("ChannelPostsWidget"));
|
||||
whileBlocking(ui.emoteicon_checkBox)->setChecked(Settings->value("Emoteicons_ChannelDecription", true).toBool());
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
void ChannelPage::updateEmotes()
|
||||
{
|
||||
Settings->beginGroup(QString("ChannelPostsWidget"));
|
||||
Settings->setValue("Emoteicons_ChannelDecription", ui.emoteicon_checkBox->isChecked());
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
@ -40,6 +40,9 @@ public:
|
||||
virtual QString pageName() const { return tr("Channels") ; }
|
||||
virtual QString helpText() const { return ""; }
|
||||
|
||||
private slots:
|
||||
void updateEmotes();
|
||||
|
||||
protected slots:
|
||||
void updateLoadThread() ;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>423</width>
|
||||
<height>340</height>
|
||||
<height>334</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
@ -36,6 +36,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="emoteicon_checkBox">
|
||||
<property name="text">
|
||||
<string>Load Emoticons</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user