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:
parent
b11a09d3e4
commit
14f4188401
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user