diff --git a/applets/kickoff/package/contents/ui/ConfigButtons.qml b/applets/kickoff/package/contents/ui/ConfigButtons.qml --- a/applets/kickoff/package/contents/ui/ConfigButtons.qml +++ b/applets/kickoff/package/contents/ui/ConfigButtons.qml @@ -16,17 +16,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ -import QtQuick 2.0 -import QtQuick.Layouts 1.0 as Layouts -import QtQuick.Controls 1.0 as Controls +import QtQuick 2.5 import QtQml.Models 2.1 + import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami GridView { id: configButtons - cellHeight: units.gridUnit * 5 + cellHeight: units.gridUnit * 6 cellWidth: units.gridUnit * 6 width: cellWidth * 5 @@ -209,4 +209,16 @@ } } } + + Kirigami.Heading { + level: 2 + text: i18n("Active Tabs") + anchors.bottom: configButtons.top + } + + Kirigami.Heading { + level: 2 + text: i18n("Inactive Tabs") + anchors.bottom: configButtons.verticalCenter + } } diff --git a/applets/kickoff/package/contents/ui/ConfigGeneral.qml b/applets/kickoff/package/contents/ui/ConfigGeneral.qml --- a/applets/kickoff/package/contents/ui/ConfigGeneral.qml +++ b/applets/kickoff/package/contents/ui/ConfigGeneral.qml @@ -16,55 +16,39 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ -import QtQuick 2.0 +import QtQuick 2.5 import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.0 as QtControls +import QtQuick.Controls 2.5 import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents - import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons - -import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.kirigami 2.5 as Kirigami ColumnLayout { + property string cfg_icon: plasmoid.configuration.icon property alias cfg_switchTabsOnHover: switchTabsOnHoverCheckbox.checked property alias cfg_showAppsByName: showApplicationsByNameCheckbox.checked property alias cfg_useExtraRunners: useExtraRunners.checked property alias cfg_alphaSort: alphaSort.checked property alias cfg_menuItems: configButtons.menuItems - spacing: units.smallSpacing + Kirigami.FormLayout { - RowLayout { - spacing: units.smallSpacing + Button { + id: iconButton - QtControls.Label { - text: i18n("Icon:") - } + Kirigami.FormData.label: i18n("Icon:") - QtControls.Button { - id: iconButton - Layout.minimumWidth: previewFrame.width + units.smallSpacing * 2 - Layout.maximumWidth: Layout.minimumWidth - Layout.minimumHeight: previewFrame.height + units.smallSpacing * 2 - Layout.maximumHeight: Layout.minimumWidth + Layout.preferredWidth: previewFrame.width + units.smallSpacing * 2 + Layout.preferredHeight: previewFrame.height + units.smallSpacing * 2 KQuickAddons.IconDialog { id: iconDialog - onIconNameChanged: cfg_icon = iconName || "start-here-kde" // TODO use actual default + onIconNameChanged: cfg_icon = iconName || "start-here-kde" } - // just to provide some visual feedback, cannot have checked without checkable enabled - checkable: true - onClicked: { - checked = Qt.binding(function() { // never actually allow it being checked - return iconMenu.status === PlasmaComponents.DialogStatus.Open - }) - - iconMenu.open(0, height) - } + onClicked: iconMenu.opened ? iconMenu.close() : iconMenu.open() PlasmaCore.FrameSvgItem { id: previewFrame @@ -81,88 +65,57 @@ source: cfg_icon } } - } - // QQC Menu can only be opened at cursor position, not a random one - PlasmaComponents.ContextMenu { - id: iconMenu - visualParent: iconButton + Menu { + id: iconMenu - PlasmaComponents.MenuItem { - text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...") - icon: "document-open-folder" - onClicked: iconDialog.open() - } - PlasmaComponents.MenuItem { - text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") - icon: "edit-clear" - onClicked: cfg_icon = "start-here-kde" // TODO reset to actual default + // Appear below the button + y: +parent.height + + MenuItem { + text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...") + icon.name: "document-open-folder" + onPressed: iconDialog.open() + } + MenuItem { + text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") + icon.name: "edit-clear" + onClicked: cfg_icon = "start-here-kde" + } } } - } - - QtControls.CheckBox { - id: switchTabsOnHoverCheckbox - text: i18n("Switch tabs on hover") - } - QtControls.CheckBox { - id: showApplicationsByNameCheckbox - text: i18n("Show applications by name") - } + CheckBox { + id: switchTabsOnHoverCheckbox - QtControls.CheckBox { - id: useExtraRunners - text: i18n("Expand search to bookmarks, files and emails") - } + Kirigami.FormData.label: i18n("General:") - QtControls.CheckBox { - id: alphaSort - text: i18n("Sort alphabetically") - } + text: i18n("Switch tabs on hover") + } - Item { - width: height - height: units.gridUnit / 2 - } + CheckBox { + id: showApplicationsByNameCheckbox + text: i18n("Show applications by name") + } - SystemPalette { - id: palette - } + CheckBox { + id: useExtraRunners + text: i18n("Expand search to bookmarks, files and emails") + } - PlasmaExtras.Heading { - level: 2 - text: i18n("Menu Buttons") - color: palette.text + CheckBox { + id: alphaSort + text: i18n("Sort alphabetically") + } } - Row { - spacing: units.gridUnit - Column { - QtControls.Label { - text: i18n("Visible Tabs") - height: configButtons.cellHeight - } - QtControls.Label { - text: i18n("Hidden Tabs") - height: configButtons.cellHeight - } - } - Column { - ConfigButtons { - id: configButtons - } - } + ConfigButtons { + id: configButtons } - QtControls.Label { + Label { Layout.fillWidth: true text: i18n("Drag tabs between the boxes to show/hide them, or reorder the visible tabs by dragging.") wrapMode: Text.WordWrap } - - Item { - //spacer - Layout.fillHeight: true - } }