Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma Mobile
Angelfish
Commits
bf497319
Commit
bf497319
authored
Mar 03, 2019
by
Simon Schmeißer
Committed by
Jonah Brüchert
Mar 18, 2019
Browse files
Add ability to close all those new tabs
parent
b46ba7fd
Changes
2
Show whitespace changes
Inline
Side-by-side
src/contents/ui/ListWebView.qml
View file @
bf497319
...
@@ -63,6 +63,12 @@ ListView {
...
@@ -63,6 +63,12 @@ ListView {
tabs
.
currentIndex
=
tabs
.
count
-
1
tabs
.
currentIndex
=
tabs
.
count
-
1
}
}
function
closeTab
(
index
)
{
tabsModel
.
remove
(
index
)
if
(
tabs
.
count
===
0
)
createEmptyTab
()
}
Component.onCompleted
:
{
Component.onCompleted
:
{
if
(
initialUrl
!==
""
)
{
if
(
initialUrl
!==
""
)
{
load
(
initialUrl
)
load
(
initialUrl
)
...
...
src/contents/ui/Tabs.qml
View file @
bf497319
...
@@ -121,6 +121,17 @@ Kirigami.ScrollablePage {
...
@@ -121,6 +121,17 @@ Kirigami.ScrollablePage {
}
}
}
}
Controls.ToolButton
{
icon.name
:
"
window-close
"
height
:
24
width
:
24
anchors.right
:
parent
.
right
anchors.rightMargin
:
8
anchors.top
:
parent
.
top
anchors.topMargin
:
8
onClicked
:
tabs
.
closeTab
(
index
)
}
}
}
footer
:
Rectangle
{
footer
:
Rectangle
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment