- QGroupBox* homeBox = new QGroupBox(i18nc("@title:group", "Home Folder"), vBox);
-
- KHBox* homeUrlBox = new KHBox(homeBox);
- homeUrlBox->setSpacing(spacing);
-
- new QLabel(i18nc("@label:textbox", "Location:"), homeUrlBox);
- m_homeUrl = new KLineEdit(homeUrlBox);
- m_homeUrl->setClearButtonShown(true);
-
- QPushButton* selectHomeUrlButton = new QPushButton(KIcon("folder-open"), QString(), homeUrlBox);
- connect(selectHomeUrlButton, SIGNAL(clicked()),
- this, SLOT(selectHomeUrl()));
-
- KHBox* buttonBox = new KHBox(homeBox);
- buttonBox->setSpacing(spacing);
-
- QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox);
- connect(useCurrentButton, SIGNAL(clicked()),
- this, SLOT(useCurrentLocation()));
- QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"), buttonBox);
- connect(useDefaultButton, SIGNAL(clicked()),
- this, SLOT(useDefaultLocation()));
-
- QVBoxLayout* homeBoxLayout = new QVBoxLayout(homeBox);
- homeBoxLayout->addWidget(homeUrlBox);
- homeBoxLayout->addWidget(buttonBox);
-
- // create 'Split view', 'Show full path', 'Editable location' and 'Filter bar' checkboxes
- m_splitView = new QCheckBox(i18nc("@option:check Startup Settings", "Split view mode"), vBox);
- m_editableUrl = new QCheckBox(i18nc("@option:check Startup Settings", "Editable location bar"), vBox);
- m_showFullPath = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path inside location bar"), vBox);
- m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"), vBox);
- connect(m_splitView, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
- connect(m_editableUrl, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
- connect(m_showFullPath, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
- connect(m_filterBar, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
-
- // Add a dummy widget with no restriction regarding
- // a vertical resizing. This assures that the dialog layout
- // is not stretched vertically.
- new QWidget(vBox);
-
- topLayout->addWidget(vBox);
+ m_homeUrlBoxLayoutContainer = new QWidget(this);
+ QHBoxLayout* homeUrlBoxLayout = new QHBoxLayout(m_homeUrlBoxLayoutContainer);
+ homeUrlBoxLayout->setContentsMargins(0, 0, 0, 0);
+
+ m_homeUrl = new QLineEdit();
+ m_homeUrl->setClearButtonEnabled(true);
+ homeUrlBoxLayout->addWidget(m_homeUrl);
+
+ QPushButton* selectHomeUrlButton = new QPushButton(QIcon::fromTheme(QStringLiteral("folder-open")), QString());
+ homeUrlBoxLayout->addWidget(selectHomeUrlButton);
+
+#ifndef QT_NO_ACCESSIBILITY
+ selectHomeUrlButton->setAccessibleName(i18nc("@action:button", "Select Home Location"));
+#endif
+
+ connect(selectHomeUrlButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::selectHomeUrl);
+
+ m_buttonBoxLayoutContainer = new QWidget(this);
+ QHBoxLayout* buttonBoxLayout = new QHBoxLayout(m_buttonBoxLayoutContainer);
+ buttonBoxLayout->setContentsMargins(0, 0, 0, 0);
+
+ QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"));
+ buttonBoxLayout->addWidget(useCurrentButton);
+ connect(useCurrentButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::useCurrentLocation);
+ QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"));
+ buttonBoxLayout->addWidget(useDefaultButton);
+ connect(useDefaultButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::useDefaultLocation);
+
+ QGridLayout* startInLocationLayout = new QGridLayout();
+ startInLocationLayout->setHorizontalSpacing(0);
+ startInLocationLayout->setContentsMargins(0, 0, 0, 0);
+ startInLocationLayout->addWidget(m_homeUrlRadioButton, 0, 0);
+ startInLocationLayout->addWidget(m_homeUrlBoxLayoutContainer, 0, 1);
+ startInLocationLayout->addWidget(m_buttonBoxLayoutContainer, 1, 1);
+
+ topLayout->addRow(i18nc("@label:textbox", "Show on startup:"), m_rememberOpenedTabsRadioButton);
+ topLayout->addRow(QString(), startInLocationLayout);
+
+
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ m_splitView = new QCheckBox(i18nc("@option:check Startup Settings", "Begin in split view mode"));
+ topLayout->addRow(i18n("New windows:"), m_splitView);
+ m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"));
+ topLayout->addRow(QString(), m_filterBar);
+ m_editableUrl = new QCheckBox(i18nc("@option:check Startup Settings", "Make location bar editable"));
+ topLayout->addRow(QString(), m_editableUrl);
+
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ m_openExternallyCalledFolderInNewTab = new QCheckBox(i18nc("@option:check Startup Settings", "Open new folders in tabs"));
+ topLayout->addRow(i18nc("@label:checkbox", "General:"), m_openExternallyCalledFolderInNewTab);
+ m_showFullPath = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path inside location bar"));
+ topLayout->addRow(QString(), m_showFullPath);
+ m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path in title bar"));
+ topLayout->addRow(QString(), m_showFullPathInTitlebar);