#include <KAuthorized>
#include <KLocalizedString>
#include <KMessageBox>
+#include <KRuntimePlatform>
#include <KWindowConfig>
#include <kwidgetsaddons_version.h>
const QSize minSize = minimumSize();
setMinimumSize(QSize(540, minSize.height()));
- setFaceType(List);
+ setFaceType(KRuntimePlatform::runtimePlatform().contains(QLatin1String("phone")) ? Tabbed : List);
setWindowTitle(i18nc("@title:window", "Configure"));
- QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults);
- box->button(QDialogButtonBox::Apply)->setEnabled(false);
- box->button(QDialogButtonBox::Ok)->setDefault(true);
- setButtonBox(box);
-
- connect(box->button(QDialogButtonBox::Ok), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
- connect(box->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
- connect(box->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, this, &DolphinSettingsDialog::restoreDefaults);
// Interface
InterfaceSettingsPage *interfaceSettingsPage = new InterfaceSettingsPage(this);
KPageWidgetItem *interfaceSettingsFrame = addPage(interfaceSettingsPage, i18nc("@title:group Interface settings", "Interface"));
- interfaceSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("system-file-manager")));
+ interfaceSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("org.kde.dolphin")));
connect(interfaceSettingsPage, &InterfaceSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
// View
}
#endif
+ // Create the buttons last so they are also last in the keyboard Tab focus order.
+ QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults);
+ box->button(QDialogButtonBox::Apply)->setEnabled(false);
+ box->button(QDialogButtonBox::Ok)->setDefault(true);
+ setButtonBox(box);
+
+ connect(box->button(QDialogButtonBox::Ok), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
+ connect(box->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
+ connect(box->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, this, &DolphinSettingsDialog::restoreDefaults);
+
const KConfigGroup dialogConfig(KSharedConfig::openStateConfig(), QStringLiteral("SettingsDialog"));
KWindowConfig::restoreWindowSize(windowHandle(), dialogConfig);
}