fix: address bar will react to changing tabs and enable mouse selection on text field
This commit is contained in:
parent
b18a1d6b4d
commit
10f8eb854b
|
@ -90,15 +90,6 @@ Rectangle {
|
||||||
Layout.leftMargin: -root.innerMargin/2
|
Layout.leftMargin: -root.innerMargin/2
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: currentWebView
|
|
||||||
onUrlChanged: {
|
|
||||||
var ensAddr = urlENSDictionary[web3Provider.getHost(currentWebView.url)];
|
|
||||||
addressBar.text = ensAddr ? web3Provider.replaceHostByENS(currentWebView.url, ensAddr) : currentWebView.url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StyledTextField {
|
StyledTextField {
|
||||||
id: addressBar
|
id: addressBar
|
||||||
height: 40
|
height: 40
|
||||||
|
|
|
@ -323,9 +323,15 @@ Rectangle {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function obtainAddress(){
|
||||||
|
var ensAddr = urlENSDictionary[web3Provider.getHost(currentWebView.url)];
|
||||||
|
browserHeader.addressBar.text = ensAddr ? web3Provider.replaceHostByENS(currentWebView.url, ensAddr) : currentWebView.url;
|
||||||
|
}
|
||||||
|
|
||||||
onCurrentWebViewChanged: {
|
onCurrentWebViewChanged: {
|
||||||
findBar.reset();
|
findBar.reset();
|
||||||
|
obtainAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
|
@ -585,6 +591,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: tabComponent
|
id: tabComponent
|
||||||
WebEngineView {
|
WebEngineView {
|
||||||
|
@ -768,6 +775,11 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: currentWebView
|
||||||
|
onUrlChanged: obtainAddress()
|
||||||
|
}
|
||||||
|
|
||||||
ProgressBar {
|
ProgressBar {
|
||||||
id: progressBar
|
id: progressBar
|
||||||
height: 3
|
height: 3
|
||||||
|
|
|
@ -5,4 +5,7 @@ import "../imports"
|
||||||
TextField {
|
TextField {
|
||||||
font.family: Style.current.fontRegular.name
|
font.family: Style.current.fontRegular.name
|
||||||
color: Style.current.textColor
|
color: Style.current.textColor
|
||||||
|
selectByMouse: true
|
||||||
|
selectedTextColor: Style.current.textColor
|
||||||
|
selectionColor: Style.current.secondaryHover
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue