Commit 81b0f42d by JanKusanagi

Initial prototype of Activity Icons (verb icons) in minor feeds; not optional yet

parent fd9a02b9
......@@ -6,8 +6,6 @@ v1.4.0 (August/September, 2017)
- The toolbar can also be moved around, after unlocking.
- Files can be attached to a post via drag&drop from a file manager.
- Dragging text from a website to the post composer works better now.
- Granular options for notifications: only DM, only highlighted by (TODO)
filters, etc.
- Option to open attachments without saving them. (TODO)
- Several improvements in the formatting options of the post/comment editor.
- Auto-switch from Fit mode to Full mode in image viewer when using the mouse (WIP)
......@@ -17,8 +15,9 @@ v1.4.0 (August/September, 2017)
icon theme, based on MIME type (i.e. PDF icon, TXT icon, etc).
- A proper file extension will be suggested when saving non-media attachments
to disk.
- Added an option to set window as "requiring attention" to notify new posts,
- Added an option to set window as "requiring attention" to notify new posts, (WIP)
which usually results in the taskbar/dock entry being highlighted.
- Optional verb-icons in the Meanwhile feed. (WIP)
- Several improvements in the account dialog.
- Translatable Appdata file. (TODO)
- Building with Qt 4 is no longer supported.
......
......@@ -3,8 +3,10 @@ General to-do list and ideas for Dianara, in no particular order:
=================================================================
/// v1.4.0?
/// v1.4.1?
- Granular options for notifications: only DM, only highlighted by
filters, etc.
- Fix crash when moving contacts around in the Audience lists of a post.
(Qt bug)
- Use Qt's own plural handling.
......@@ -39,8 +41,6 @@ General to-do list and ideas for Dianara, in no particular order:
- Show if a contact is following you, in the avatar menu or the avatar itself.
- Optional verb-icons in the Meanwhile feed.
- Option to open links to youtube.com/youtu.be in external program (i.e. Minitube)
(maybe even any custom URL via regexp)
......
......@@ -297,13 +297,39 @@ MinorFeedItem::MinorFeedItem(ASActivity *activity,
topLayout = new QHBoxLayout();
topLayout->setContentsMargins(0, 0, 0, 0);
if (authorId == pController->currentUserId())
if (true) // FIXME: TODO -- add config option
{
// Temporary stuff for tests
QVariantMap iconForVerb;
iconForVerb.insert("like", "emblem-favorite");
iconForVerb.insert("favorite", "emblem-favorite");
iconForVerb.insert("post", "mail-send");
iconForVerb.insert("update", "view-refresh");
iconForVerb.insert("follow", "list-add-user");
verbIconLabel = new QLabel(this);
verbIconLabel->setPixmap(QIcon::fromTheme(iconForVerb.value(activity->getVerb())
.toString())
.pixmap(globalObj->getMfAvatarSize()));
/* CSS experiment *****************************************************
this->setStyleSheet("MinorFeedItem {"
" border-image: url(:/images/button-like.png)"
" 0 0 0 0 repeat stretch"
"}");
*/
}
if (authorId == pController->currentUserId()) // For our items, text first
{
topLayout->addLayout(rightLayout, 20);
topLayout->addLayout(leftLayout, 1);
topLayout->addWidget(verbIconLabel, 0, Qt::AlignTop);
}
else // Normal item, not ours
else // Normal item, not ours, layout with avatar first
{
topLayout->addWidget(verbIconLabel, 0, Qt::AlignTop);
topLayout->addSpacing(2);
topLayout->addLayout(leftLayout, 1);
topLayout->addLayout(rightLayout, 20);
}
......
......@@ -87,6 +87,7 @@ private:
QVBoxLayout *rightLayout;
QHBoxLayout *rightLowerLayout;
QLabel *verbIconLabel;
AvatarButton *avatarButton;
QLabel *timestampLabel;
QLabel *activityDescriptionLabel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment