Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma Mobile
Angelfish
Commits
8d95f010
Commit
8d95f010
authored
Feb 20, 2020
by
Rinigus Saar
Committed by
Jonah Brüchert
Feb 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open url entry with bookmarks on new tab
Fixes
#13
and related to
#12
parent
7bef4c89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
src/contents/ui/NavigationEntrySheet.qml
src/contents/ui/NavigationEntrySheet.qml
+10
-2
src/contents/ui/Tabs.qml
src/contents/ui/Tabs.qml
+1
-0
No files found.
src/contents/ui/NavigationEntrySheet.qml
View file @
8d95f010
...
...
@@ -43,6 +43,7 @@ Controls.Drawer {
property
int
buttonSize
:
Kirigami
.
Units
.
gridUnit
*
2
property
int
fullHeight
:
0.9
*
rootPage
.
height
property
bool
openedState
:
false
property
bool
justOpened
:
false
contentHeight
:
fullHeight
-
topPadding
-
bottomPadding
contentWidth
:
parent
.
width
-
rightPadding
-
leftPadding
...
...
@@ -79,7 +80,11 @@ Controls.Drawer {
onActiveFocusChanged
:
if
(
activeFocus
)
selectAll
()
onAccepted
:
applyUrl
()
onTextChanged
:
urlFilter
.
setFilterFixedString
(
text
)
onTextChanged
:
{
if
(
!
openedState
)
return
;
// avoid filtering
urlFilter
.
setFilterFixedString
(
text
);
justOpened
=
false
;
}
Keys.onEscapePressed
:
if
(
overlay
.
sheetOpen
)
overlay
.
close
()
function
applyUrl
()
{
...
...
@@ -126,7 +131,7 @@ Controls.Drawer {
model
:
UrlFilterProxyModel
{
id
:
urlFilter
sourceModel
:
BrowserManager
.
history
sourceModel
:
(
!
openedState
||
justOpened
||
!
urlInput
.
text
)
?
BrowserManager
.
bookmarks
:
BrowserManager
.
history
}
}
}
...
...
@@ -138,6 +143,9 @@ Controls.Drawer {
urlInput
.
text
=
currentWebView
.
requestedUrl
;
urlInput
.
forceActiveFocus
();
urlInput
.
selectAll
();
justOpened
=
true
;
urlFilter
.
setFilterFixedString
(
''
);
openedState
=
true
;
listView
.
positionViewAtBeginning
();
}
...
...
src/contents/ui/Tabs.qml
View file @
8d95f010
...
...
@@ -48,6 +48,7 @@ Kirigami.ScrollablePage {
// Somewhat weird behaviour, consider always just opening "about:blank"
tabs
.
tabsModel
.
newTab
(
rootPage
.
privateMode
?
"
about:blank
"
:
BrowserManager
.
homepage
)
pageStack
.
pop
()
urlEntry
.
open
();
}
}
...
...
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