_selectiveSync = new SelectiveSyncWidget(account, this);
layout->addWidget(_selectiveSync);
- if (ConfigFile().showExperimentalOptions()) {
+ if (Theme::instance()->showVirtualFilesOption()) {
_virtualFilesCheckBox = new QCheckBox(tr("Use virtual files instead of downloading content immediately (experimental)"));
connect(_virtualFilesCheckBox, &QCheckBox::clicked, this, &FolderWizardSelectiveSync::virtualFilesCheckboxClicked);
connect(_virtualFilesCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
{
WizardCommon::initErrorLabel(_ui.errorLabel);
- if (!ConfigFile().showExperimentalOptions()) {
+ if (!Theme::instance()->showVirtualFilesOption()) {
// If the layout were wrapped in a widget, the auto-grouping of the
// radio buttons no longer works and there are surprising margins.
// Just manually hide the button and remove the layout.
#include "config.h"
#include "common/utility.h"
#include "version.h"
+#include "configfile.h"
#include <QtCore>
#ifndef TOKEN_AUTH_ONLY
return createColorAwarePixmap(name, QGuiApplication::palette());
}
+bool Theme::showVirtualFilesOption() const
+{
+ return ConfigFile().showExperimentalOptions();
+}
+
} // end namespace client
*/
static QPixmap createColorAwarePixmap(const QString &name);
+
+ /**
+ * @brief Whether to show the option to create folders using "virtual files".
+ *
+ * By default, the options are not shown unless experimental options are
+ * manually enabled in the configuration file.
+ */
+ virtual bool showVirtualFilesOption() const;
+
protected:
#ifndef TOKEN_AUTH_ONLY
QIcon themeIcon(const QString &name, bool sysTray = false) const;