mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
browser url bar
This commit is contained in:
parent
1fa98129c0
commit
5f051551aa
2 changed files with 157 additions and 15 deletions
|
|
@ -50,7 +50,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
mainSplit.setView(wallet.view, wallet.menuItem);
|
mainSplit.setView(wallet.view, wallet.menuItem);
|
||||||
|
|
||||||
newBrowserTab("http://etherian.io");
|
newBrowserTab("http://ethereum-dapp-whisper-client.meteor.com/chat/ethereum");
|
||||||
|
|
||||||
// Command setup
|
// Command setup
|
||||||
gui.sendCommand(0)
|
gui.sendCommand(0)
|
||||||
|
|
@ -330,6 +330,7 @@ ApplicationWindow {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
resizing: false
|
resizing: false
|
||||||
|
|
||||||
|
|
||||||
function setView(view, menu) {
|
function setView(view, menu) {
|
||||||
for(var i = 0; i < views.length; i++) {
|
for(var i = 0; i < views.length; i++) {
|
||||||
views[i].view.visible = false
|
views[i].view.visible = false
|
||||||
|
|
@ -367,6 +368,8 @@ ApplicationWindow {
|
||||||
id: menu
|
id: menu
|
||||||
Layout.minimumWidth: 192
|
Layout.minimumWidth: 192
|
||||||
Layout.maximumWidth: 192
|
Layout.maximumWidth: 192
|
||||||
|
border.width: 10
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.height
|
width: parent.height
|
||||||
|
|
@ -680,6 +683,9 @@ ApplicationWindow {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
|
border.width: 10
|
||||||
|
border.color: "#00FF0F"
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: urlPane
|
id: urlPane
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ Rectangle {
|
||||||
|
|
||||||
//uriNav.text = uri.text.replace(/(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.\w{2,3})(.*)/, "$1$2<span style='color:#CCC'>$3</span>");
|
//uriNav.text = uri.text.replace(/(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.\w{2,3})(.*)/, "$1$2<span style='color:#CCC'>$3</span>");
|
||||||
uriNav.text = uri;
|
uriNav.text = uri;
|
||||||
|
appDomain.text = "some.thing"
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Prevent inf loop.
|
// Prevent inf loop.
|
||||||
window.cleanPath = false;
|
window.cleanPath = false;
|
||||||
|
|
@ -79,39 +81,163 @@ Rectangle {
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
leftMargin: 7
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: back
|
id: back
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
webview.goBack()
|
webview.goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 6
|
||||||
|
}
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Image {
|
background: Image {
|
||||||
source: "../../back.png"
|
source: "../../backButton.png"
|
||||||
width: 30
|
width: 20
|
||||||
height: 30
|
height: 30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
|
||||||
anchors {
|
|
||||||
|
Rectangle {
|
||||||
|
id: appInfoPane
|
||||||
|
height: 28
|
||||||
|
color: "#FFFFFF"
|
||||||
|
radius: 6
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
z: 10
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
uriNav.visible = true
|
||||||
|
appTitle.visible = false
|
||||||
|
appDomain.visible = false
|
||||||
|
|
||||||
|
}
|
||||||
|
/*onExited: {
|
||||||
|
uriNav.visible = false
|
||||||
|
appTitle.visible = true
|
||||||
|
appDomain.visible = true
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
anchors {
|
||||||
left: back.right
|
left: back.right
|
||||||
right: toggleInspector.left
|
right: parent.right
|
||||||
leftMargin: 10
|
leftMargin: 10
|
||||||
rightMargin: 10
|
rightMargin: 10
|
||||||
}
|
}
|
||||||
text: webview.url;
|
|
||||||
id: uriNav
|
|
||||||
y: parent.height / 2 - this.height / 2
|
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Text {
|
||||||
webview.url = this.text;
|
id: appTitle
|
||||||
}
|
text: webview.title
|
||||||
|
font.bold: true
|
||||||
|
font.capitalization: Font.AllUppercase
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.horizontalCenter
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
rightMargin: 10
|
||||||
|
}
|
||||||
|
color: "#928484"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: appDomain
|
||||||
|
text: webview.url
|
||||||
|
font.bold: false
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.horizontalCenter
|
||||||
|
right: parent.right
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
leftMargin: 10
|
||||||
|
}
|
||||||
|
color: "#928484"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: uriNav
|
||||||
|
visible: false
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
leftMargin: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
style: TextFieldStyle {
|
||||||
|
textColor: "#928484"
|
||||||
|
background: Rectangle {
|
||||||
|
border.width: 0
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
text: webview.url;
|
||||||
|
y: parent.height / 2 - this.height / 2
|
||||||
|
z: 20
|
||||||
|
Keys.onReturnPressed: {
|
||||||
|
webview.url = this.text;
|
||||||
|
uriNav.visible = false
|
||||||
|
appTitle.visible = true
|
||||||
|
appDomain.visible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*text {
|
||||||
|
id: appTitle
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.horizontalCenter
|
||||||
|
text: "APP TITLE"
|
||||||
|
font.bold: true
|
||||||
|
color: "#928484"
|
||||||
|
}*/
|
||||||
|
z:2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: appInfoPaneShadow
|
||||||
|
width: 10
|
||||||
|
height: 30
|
||||||
|
color: "#BDB6B6"
|
||||||
|
radius: 6
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: back.right
|
||||||
|
right: parent.right
|
||||||
|
leftMargin:10
|
||||||
|
rightMargin:10
|
||||||
|
top: parent.top
|
||||||
|
topMargin: 23
|
||||||
|
}
|
||||||
|
|
||||||
|
z:1
|
||||||
|
}
|
||||||
|
/*
|
||||||
Button {
|
Button {
|
||||||
id: toggleInspector
|
id: toggleInspector
|
||||||
anchors {
|
anchors {
|
||||||
|
|
@ -128,7 +254,17 @@ Rectangle {
|
||||||
inspector.url = webview.experimental.remoteInspectorUrl
|
inspector.url = webview.experimental.remoteInspectorUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: "#F6F1F2" }
|
||||||
|
GradientStop { position: 1.0; color: "#DED5D5" }
|
||||||
|
}
|
||||||
|
z:-1
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Border
|
// Border
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue