Warning, /network/angelfish/src/contents/ui/desktop/settings/HomeSettingsPage.qml is written in an unsupported language. File is not indexed.
0001 //SPDX-FileCopyrightText: 2021 Felipe Kinoshita <kinofhek@gmail.com> 0002 //SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Controls 2.15 as QQC2 0006 import QtQuick.Layouts 1.15 0007 import org.kde.kirigami 2.19 as Kirigami 0008 import org.kde.kirigamiaddons.formcard 1.0 as FormCard 0009 0010 import org.kde.angelfish 1.0 0011 0012 Kirigami.ScrollablePage { 0013 id: root 0014 title: i18n("Toolbars") 0015 0016 leftPadding: 0 0017 rightPadding: 0 0018 topPadding: Kirigami.Units.gridUnit 0019 bottomPadding: Kirigami.Units.gridUnit 0020 0021 ColumnLayout { 0022 spacing: 0 0023 0024 FormCard.FormHeader { 0025 title: root.title 0026 } 0027 0028 FormCard.FormCard { 0029 Layout.fillWidth: true 0030 0031 FormCard.FormSwitchDelegate { 0032 id: showHome 0033 text: i18n("Show home button:") 0034 description: i18n("The home button will be shown next to the reload button in the toolbar.") 0035 checked: Settings.showHomeButton 0036 onClicked: Settings.showHomeButton = checked 0037 } 0038 0039 FormCard.FormDelegateSeparator { above: homepage; below: showHome; visible: homepage.visible } 0040 0041 FormCard.FormTextFieldDelegate { 0042 id: homepage 0043 visible: Settings.showHomeButton 0044 label: i18n("Homepage:") 0045 text: Settings.homepage 0046 onAccepted: { 0047 let url = text; 0048 if (url.indexOf(":/") < 0) { 0049 url = "http://" + url; 0050 } 0051 Settings.homepage = url; 0052 } 0053 onEditingFinished: { 0054 let url = text; 0055 if (url.indexOf(":/") < 0) { 0056 url = "http://" + url; 0057 } 0058 Settings.homepage = url; 0059 } 0060 0061 } 0062 0063 FormCard.FormDelegateSeparator { above: newTab } 0064 0065 FormCard.FormTextFieldDelegate { 0066 id: newTab 0067 label: i18n("New tabs:") 0068 text: Settings.newTabUrl 0069 onAccepted: { 0070 let url = text; 0071 if (url.indexOf(":/") < 0) { 0072 url = "http://" + url; 0073 } 0074 Settings.newTabUrl = url; 0075 } 0076 onEditingFinished: { 0077 let url = text; 0078 if (url.indexOf(":/") < 0) { 0079 url = "http://" + url; 0080 } 0081 Settings.newTabUrl = url; 0082 } 0083 0084 } 0085 0086 FormCard.FormDelegateSeparator { above: alwaysShowTabs } 0087 0088 FormCard.FormSwitchDelegate { 0089 id: alwaysShowTabs 0090 text: i18n("Always show the tab bar") 0091 description: i18n("The tab bar will be displayed even if there is only one tab open") 0092 checked: Settings.showTabBar 0093 onClicked: Settings.showTabBar = checked 0094 } 0095 } 0096 } 0097 }