Verified Commit 1fd91847 authored by Rinigus Saar's avatar Rinigus Saar Committed by Jonah Brüchert
Browse files

convert new tab addition into tabs page action

parent e42d1125
......@@ -35,8 +35,19 @@ import org.kde.kirigami 2.7 as Kirigami
Kirigami.ScrollablePage {
id: tabsRoot
title: i18n("Tabs")
Kirigami.ColumnView.fillWidth: false
actions.main: Kirigami.Action {
icon.name: "list-add"
text: i18n("New")
onTriggered: {
tabs.newTab(browserManager.homepage)
tabs.currentIndex = tabs.count - 1;
pageStack.pop()
}
}
property int itemHeight: Math.round(itemWidth/ 3 * 2)
property int itemWidth: Kirigami.Units.gridUnit * 9
......@@ -142,25 +153,5 @@ Kirigami.ScrollablePage {
}
}
footer: Item {
width: itemWidth
height: itemHeight
Kirigami.Icon {
anchors.fill: parent
anchors.margins: Math.round(itemHeight / 4)
source: "list-add"
}
MouseArea {
anchors.fill: parent
onClicked: {
tabs.newTab(browserManager.homepage)
//addressBar.forceActiveFocus();
//addressBar.selectAll();
tabs.currentIndex = tabs.count - 1;
pageStack.pop()
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment