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

refactor: save friendScroll as a class member

This commit is contained in:
TriKriSta 2020-03-17 15:12:01 +02:00 committed by Anthony Bilinski
parent b11a09d3e4
commit 14f4188401
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,7 @@ ContentDialog::ContentDialog(const Core &core, QWidget* parent)
onGroupchatPositionChanged(s.getGroupchatPosition());
QScrollArea* friendScroll = new QScrollArea(this);
friendScroll = new QScrollArea(this);
friendScroll->setMinimumWidth(minWidget);
friendScroll->setFrameStyle(QFrame::NoFrame);
friendScroll->setLayoutDirection(Qt::RightToLeft);
@ -438,7 +438,7 @@ void ContentDialog::setUsername(const QString& newName)
void ContentDialog::reloadTheme()
{
setStyleSheet(Style::getStylesheet("contentDialog/contentDialog.css"));
splitter->widget(0)->setStyleSheet(Style::getStylesheet("friendList/friendList.css"));
friendScroll->setStyleSheet(Style::getStylesheet("friendList/friendList.css"));
}
bool ContentDialog::event(QEvent* event)

View File

@ -44,6 +44,7 @@ class GroupChatroom;
class GroupWidget;
class QCloseEvent;
class QSplitter;
class QScrollArea;
class ContentDialog : public ActivateDialog, public IDialogs
{
@ -122,6 +123,7 @@ private:
private:
QList<QLayout*> layouts;
QSplitter* splitter;
QScrollArea* friendScroll;
FriendListLayout* friendLayout;
GenericChatItemLayout groupLayout;
ContentLayout* contentLayout;