Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014 ownCloud GmbH
Expand Down Expand Up @@ -45,6 +45,7 @@
#include <QListWidgetItem>
#include <QMessageBox>
#include <QAction>
#include <QAbstractScrollArea>
#include <QSizePolicy>
#include <QVBoxLayout>
#include <QTreeView>
Expand Down Expand Up @@ -188,10 +189,10 @@
_ui->tabWidget->setStyleSheet(QStringLiteral(
"QTabWidget { background: transparent; }"
"QTabWidget::pane { background: palette(alternate-base); border: none; }"
"QWidget#standardSyncTab, QWidget#connectionSettingsTab, QWidget#fileProviderPanelContents {"
"QWidget#syncFoldersPanelContents, QWidget#connectionSettingsTab, QWidget#fileProviderPanelContents {"
" background: palette(alternate-base); }"));
_ui->standardSyncTab->setAutoFillBackground(true);
_ui->standardSyncTab->setAttribute(Qt::WA_StyledBackground, true);
_ui->syncFoldersPanelContents->setAutoFillBackground(true);
_ui->syncFoldersPanelContents->setAttribute(Qt::WA_StyledBackground, true);
_ui->fileProviderPanelContents->setAutoFillBackground(true);
_ui->fileProviderPanelContents->setAttribute(Qt::WA_StyledBackground, true);
_ui->connectionSettingsTab->setAutoFillBackground(true);
Expand All @@ -206,7 +207,8 @@
_ui->_folderList->setStyleSheet(QStringLiteral("QTreeView { background: palette(alternate-base); }"));
_ui->_folderList->setItemDelegate(delegate);
_ui->_folderList->setModel(_model);
_ui->_folderList->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
_ui->_folderList->setMinimumWidth(300);

Check warning on line 211 in src/gui/accountsettings.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/accountsettings.cpp:211:39 [cppcoreguidelines-avoid-magic-numbers]

300 is a magic number; consider replacing it with a named constant

new ToolTipUpdater(_ui->_folderList);

Expand Down Expand Up @@ -263,6 +265,12 @@
refreshSelectiveSyncStatus();
connect(_model, &QAbstractItemModel::rowsInserted,
this, &AccountSettings::refreshSelectiveSyncStatus);
connect(_model, &QAbstractItemModel::rowsInserted,
_ui->_folderList, &QWidget::updateGeometry);
connect(_model, &QAbstractItemModel::rowsRemoved,
_ui->_folderList, &QWidget::updateGeometry);
connect(_model, &QAbstractItemModel::modelReset,
_ui->_folderList, &QWidget::updateGeometry);

auto *syncNowAction = new QAction(this);
syncNowAction->setShortcut(QKeySequence(Qt::Key_F6));
Expand Down
Loading
Loading