Merge pull request #1861 from defnax/Wire-cosmetic-changes

[TheWire] Added icons for create & post to pulse & changed strings
This commit is contained in:
csoler 2020-04-19 17:59:44 +02:00 committed by GitHub
commit aeada86f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 20 deletions

View File

@ -1,15 +1,5 @@
<RCC>
<qresource prefix="/" >
<file>images/kuickshow.png</file>
<file>images/kview_24.png</file>
<file>images/kview_64.png</file>
<file>images/album_64.png</file>
<file>images/album_subscribe.png</file>
<file>images/album_unsubscribe.png</file>
<file>images/album_create_64.png</file>
<file>images/album_default_128.png</file>
<file>images/my_album_48.png</file>
<file>images/subscribed_album_48.png</file>
<file>images/friends_album_48.png</file>
<file>images/compose.png</file>
</qresource>
</RCC>

View File

@ -40,6 +40,13 @@
<property name="text">
<string>Create Account</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/add.png</normaloff>:/icons/png/add.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
@ -47,6 +54,13 @@
<property name="text">
<string>Post Pulse</string>
</property>
<property name="icon">
<iconset resource="TheWire_images.qrc">
<normaloff>:/images/compose.png</normaloff>:/images/compose.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
@ -143,7 +157,7 @@
</item>
<item>
<property name="text">
<string>Subscribed</string>
<string>Following</string>
</property>
</item>
<item>
@ -153,6 +167,20 @@
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="followLabel">
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Who to Follow</string>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea_2">
<property name="widgetResizable">
@ -163,8 +191,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>231</width>
<height>435</height>
<width>228</width>
<height>421</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
@ -291,8 +319,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>429</width>
<height>435</height>
<width>431</width>
<height>443</height>
</rect>
</property>
<property name="styleSheet">
@ -339,6 +367,7 @@
</widget>
<resources>
<include location="TheWire_images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -24,6 +24,7 @@
#include <QBuffer>
#include "WireGroupItem.h"
#include "gui/gxs/GxsIdDetails.h"
#include <algorithm>
#include <iostream>
@ -50,6 +51,16 @@ void WireGroupItem::setup()
label_authorId->setId(mGroup.mMeta.mAuthorId);
frame_details->setVisible(false);
RsIdentityDetails idDetails ;
rsIdentity->getIdDetails(mGroup.mMeta.mAuthorId,idDetails);
QPixmap pixmap ;
if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL))
pixmap = GxsIdDetails::makeDefaultIcon(mGroup.mMeta.mAuthorId,GxsIdDetails::SMALL);
label_avatar->setPixmap(pixmap);
connect(toolButton_show, SIGNAL(clicked()), this, SLOT(show()));
connect(toolButton_subscribe, SIGNAL(clicked()), this, SLOT(subscribe()));
setGroupSet();
@ -64,13 +75,13 @@ void WireGroupItem::setGroupSet()
}
else if (mGroup.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED)
{
toolButton_type->setText("Subcribed");
toolButton_subscribe->setText("Unsubcribe");
toolButton_type->setText("Following");
toolButton_subscribe->setText("Unfollow");
}
else
{
toolButton_type->setText("Other");
toolButton_subscribe->setText("Subcribe");
toolButton_subscribe->setText("Follow");
}
}

View File

@ -25,6 +25,22 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_avatar">
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>Avatar</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_groupName">
<property name="text">

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1241,6 +1241,7 @@ gxsthewire {
gui/TheWire/WireGroupDialog.cpp \
gui/TheWire/PulseAddDialog.cpp \
RESOURCES += gui/TheWire/TheWire_images.qrc
}
identities {