mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2573 from defnax/messagestreefontsfix
Added to fix font metrics for messages tree
This commit is contained in:
commit
d7eac8f5e4
@ -156,7 +156,7 @@ QIcon FilesDefs::getIconFromGxsIdCache(const RsGxsId& id,const QIcon& setIcon, b
|
||||
if (setIcon.isNull())
|
||||
{
|
||||
if (id.isNull())
|
||||
return getIconFromQtResourcePath(":/icons/notification.png");
|
||||
return getIconFromQtResourcePath(":/icons/notification.svg");
|
||||
|
||||
auto item = mIconCache.find(id);
|
||||
|
||||
|
@ -199,7 +199,7 @@ void GxsIdTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||
if(id.isNull())
|
||||
{
|
||||
if (ownOption.icon.isNull())
|
||||
ownOption.icon = FilesDefs::getIconFromQtResourcePath(":/icons/notification.png");
|
||||
ownOption.icon = FilesDefs::getIconFromQtResourcePath(":/icons/notification.svg");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -341,5 +341,6 @@
|
||||
<file>icons/wire.png</file>
|
||||
<file>icons/wire-circle.png</file>
|
||||
<file>icons/folder-account.svg</file>
|
||||
<file>icons/notification.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
38
retroshare-gui/src/gui/icons/notification.svg
Normal file
38
retroshare-gui/src/gui/icons/notification.svg
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
id="svg4"
|
||||
sodipodi:docname="notification.svg"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="21.666667"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="12.023077"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21"
|
||||
id="path2"
|
||||
style="fill:#039bd5;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -228,6 +228,9 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
msgwheader->setStretchLastSection(true);
|
||||
|
||||
QFontMetricsF fontMetrics(ui.messageTreeWidget->font());
|
||||
int iconHeight = fontMetrics.height() * 1.4;
|
||||
ui.messageTreeWidget->setIconSize(QSize(iconHeight, iconHeight));
|
||||
|
||||
// fill folder list
|
||||
updateMessageSummaryList();
|
||||
|
@ -375,6 +375,11 @@
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="RSTreeView" name="messageTreeWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user