summary refs log tree commit diff
path: root/src/RoomInfoListItem.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-19 03:45:46 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-19 03:45:46 +0300
commit48618b438f9ba7754bb3778d3559897720e453e9 (patch)
tree5496c6e951bf42dc172f008c6722d00afb976bfa /src/RoomInfoListItem.cc
parentSimplify room list item (diff)
downloadnheko-48618b438f9ba7754bb3778d3559897720e453e9.tar.xz
Add hover color on RoomList items
Diffstat (limited to 'src/RoomInfoListItem.cc')
-rw-r--r--src/RoomInfoListItem.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc
index 1ed1a906..672a926b 100644
--- a/src/RoomInfoListItem.cc
+++ b/src/RoomInfoListItem.cc
@@ -32,6 +32,8 @@ RoomInfoListItem::RoomInfoListItem(RoomState state, QString room_id, QWidget *pa
     , unreadMsgCount_(0)
 {
 	setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+	setMouseTracking(true);
+	setAttribute(Qt::WA_Hover);
 
 	setFixedHeight(maxHeight_);
 	setMaximumSize(parent->width(), maxHeight_);
@@ -55,6 +57,8 @@ void RoomInfoListItem::paintEvent(QPaintEvent *event)
 
 	if (isPressed_)
 		p.fillRect(rect(), QColor("#38A3D8"));
+	else if (underMouse())
+		p.fillRect(rect(), QColor(200, 200, 200, 128));
 	else
 		p.fillRect(rect(), QColor("#F8FBFE"));