mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
Merge branch 'develop'
This commit is contained in:
commit
fc8bd7229e
@ -100,7 +100,7 @@ ApplicationWindow {
|
||||
anchors.right: parent.right
|
||||
height: 200
|
||||
Image {
|
||||
source: ui.assetPath("tx.png")
|
||||
source: "../tx.png"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@ -110,7 +110,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
Image {
|
||||
source: ui.assetPath("new.png")
|
||||
source: "../new.png"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@ -120,7 +120,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
Image {
|
||||
source: ui.assetPath("net.png")
|
||||
source: "../net.png"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@ -131,7 +131,7 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Image {
|
||||
source: ui.assetPath("heart.png")
|
||||
source: "../heart.png"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@ -436,7 +436,7 @@ ApplicationWindow {
|
||||
onDoubleClicked: peerWindow.visible = true
|
||||
anchors.fill: parent
|
||||
}
|
||||
source: ui.assetPath("network.png")
|
||||
source: "../network.png"
|
||||
}
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ ApplicationWindow {
|
||||
width: 150
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
source: ui.assetPath("facet.png")
|
||||
source: "../facet.png"
|
||||
x: 10
|
||||
y: 10
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ ApplicationWindow {
|
||||
experimental.preferences.javascriptEnabled: true
|
||||
experimental.preferences.navigatorQtObjectEnabled: true
|
||||
experimental.preferences.developerExtrasEnabled: true
|
||||
experimental.userScripts: [ui.assetPath("ext/pre.js"), ui.assetPath("ext/big.js"), ui.assetPath("ext/string.js"), ui.assetPath("ext/ethereum.js")]
|
||||
experimental.userScripts: ["../ext/pre.js", "../ext/big.js", "../ext/string.js", "../ext/ethereum.js"]
|
||||
experimental.onMessageReceived: {
|
||||
console.log("[onMessageReceived]: ", message.data)
|
||||
// TODO move to messaging.js
|
||||
|
@ -52,8 +52,8 @@ func defaultAssetPath() string {
|
||||
assetPath = filepath.Join(exedir, "../Resources")
|
||||
case "linux":
|
||||
assetPath = "/usr/share/ethereal"
|
||||
case "window":
|
||||
fallthrough
|
||||
case "windows":
|
||||
assetPath = "./assets"
|
||||
default:
|
||||
assetPath = "."
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"github.com/ethereum/eth-go/ethpub"
|
||||
"github.com/ethereum/eth-go/ethutil"
|
||||
"github.com/go-qml/qml"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
type QmlApplication struct {
|
||||
@ -20,7 +21,14 @@ func NewQmlApplication(path string, lib *UiLib) *QmlApplication {
|
||||
}
|
||||
|
||||
func (app *QmlApplication) Create() error {
|
||||
component, err := app.engine.LoadFile(app.path)
|
||||
path := string(app.path)
|
||||
|
||||
// For some reason for windows we get /c:/path/to/something, windows doesn't like the first slash but is fine with the others so we are removing it
|
||||
if string(app.path[0]) == "/" && runtime.GOOS == "windows" {
|
||||
path = app.path[1:]
|
||||
}
|
||||
|
||||
component, err := app.engine.LoadFile(path)
|
||||
if err != nil {
|
||||
logger.Warnln(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user