1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

moved scrollbar to the left, cleanup

This commit is contained in:
krepa098 2014-08-11 19:46:14 +02:00
parent 62bcb86c8b
commit e5f0ac7c91
3 changed files with 11 additions and 9 deletions

View File

@ -25,16 +25,16 @@
FriendWidget::FriendWidget(int FriendId, QString id)
: friendId(FriendId)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
this->setMouseTracking(true);
this->setAutoFillBackground(true);
this->setFixedHeight(55);
this->setLayout(&layout);
setMouseTracking(true);
setAutoFillBackground(true);
setFixedHeight(55);
setLayout(&layout);
layout.setSpacing(0);
layout.setMargin(0);
layout.setStretchFactor(this, 100);
textLayout.setSpacing(0);
textLayout.setMargin(0);
setLayoutDirection(Qt::LeftToRight); // parent might have set Qt::RightToLeft
avatar.setPixmap(QPixmap(":img/contact.png"));
name.setText(id);

View File

@ -24,14 +24,15 @@
GroupWidget::GroupWidget(int GroupId, QString Name)
: groupId{GroupId}
{
this->setMouseTracking(true);
this->setAutoFillBackground(true);
this->setLayout(&layout);
this->setFixedHeight(55);
setMouseTracking(true);
setAutoFillBackground(true);
setLayout(&layout);
setFixedHeight(55);
layout.setSpacing(0);
layout.setMargin(0);
textLayout.setSpacing(0);
textLayout.setMargin(0);
setLayoutDirection(Qt::LeftToRight); // parent might have set Qt::RightToLeft
avatar.setPixmap(QPixmap(":img/group.png"));
statusPic.setPixmap(QPixmap(":img/status/dot_online.png"));

View File

@ -118,6 +118,7 @@ Widget::Widget(QWidget *parent)
friendListWidget->layout()->setMargin(0);
friendListWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
ui->friendList->setWidget(friendListWidget);
ui->friendList->setLayoutDirection(Qt::RightToLeft);
// delay setting username and message until Core inits
//ui->nameLabel->setText(core->getUsername());