Browse Source

refactor: save friendScroll as a class member

pull/5934/head
TriKriSta 5 years ago committed by Anthony Bilinski
parent
commit
14f4188401
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 4
      src/widget/contentdialog.cpp
  2. 2
      src/widget/contentdialog.h

4
src/widget/contentdialog.cpp

@ -82,7 +82,7 @@ ContentDialog::ContentDialog(const Core &core, QWidget* parent) @@ -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) @@ -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)

2
src/widget/contentdialog.h

@ -44,6 +44,7 @@ class GroupChatroom; @@ -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: @@ -122,6 +123,7 @@ private:
private:
QList<QLayout*> layouts;
QSplitter* splitter;
QScrollArea* friendScroll;
FriendListLayout* friendLayout;
GenericChatItemLayout groupLayout;
ContentLayout* contentLayout;

Loading…
Cancel
Save