Merge pull request #196

eef11bf remove qtquick 2.6 dependency (Jaquee)
3245d7d redesign daemon progress bar to fit smaller screens (Jaquee)
a0756ff adjust menuButton height dynamically (Jaquee)
4274167 adjust appwindow min height to fit content (Jaquee)
This commit is contained in:
Riccardo Spagni 2016-12-08 23:50:23 +02:00
commit 1588f1ba7b
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
3 changed files with 26 additions and 19 deletions

View file

@ -31,8 +31,8 @@ import QtQuick 2.0
Item { Item {
id: item id: item
property int fillLevel: 0 property int fillLevel: 0
height: 44 height: 22
anchors.margins: 10 anchors.margins:15
visible: false visible: false
//clip: true //clip: true
@ -42,7 +42,6 @@ Item {
fillLevel = progressLevel fillLevel = progressLevel
console.log("target block: ",progressLevel) console.log("target block: ",progressLevel)
progressText.text = qsTr("Synchronizing blocks %1/%2").arg(currentBlock.toFixed(0)).arg(targetBlock.toFixed(0)); progressText.text = qsTr("Synchronizing blocks %1/%2").arg(currentBlock.toFixed(0)).arg(targetBlock.toFixed(0));
console.log("Progress text: " + progressText.text);
// TODO: lower daemon block height cache, ttl and refresh interval? // TODO: lower daemon block height cache, ttl and refresh interval?
@ -56,8 +55,8 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: 18 height: 22
//radius: 4 radius: 2
color: "#FFFFFF" color: "#FFFFFF"
Rectangle { Rectangle {
@ -66,25 +65,33 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.margins: 2 anchors.margins: 2
height: bar.height
property int maxWidth: parent.width - 4 property int maxWidth: parent.width - 4
width: (maxWidth * fillLevel) / 100 width: (maxWidth * fillLevel) / 100
color: { color: {
if(item.fillLevel < 99) return "#FF6C3C" if(item.fillLevel < 99 ) return "#FF6C3C"
//if(item.fillLevel < 99) return "#FFE00A" //if(item.fillLevel < 99) return "#FFE00A"
return "#36B25C" return "#36B25C"
} }
} }
}
Text { Rectangle {
id:progressText color:"#333"
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
font.family: "Arial" anchors.left: parent.left
font.pixelSize: 12 anchors.leftMargin: 8
color: "#545454"
text: qsTr("Synchronizing blocks") Text {
id:progressText
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 12
color: "#000"
text: qsTr("Synchronizing blocks")
height:18
}
}
} }
} }

View file

@ -36,7 +36,7 @@ Rectangle {
property alias symbol: symbolText.text property alias symbol: symbolText.text
signal clicked() signal clicked()
height: 64 height: (appWindow.height >= 800) ? 64 : 60
color: checked ? "#FFFFFF" : "#1C1C1C" color: checked ? "#FFFFFF" : "#1C1C1C"
Item { Item {

View file

@ -954,7 +954,7 @@ ApplicationWindow {
} }
property int maxWidth: leftPanel.width + 655 + rightPanel.width property int maxWidth: leftPanel.width + 655 + rightPanel.width
property int maxHeight: 700 property int minHeight: 720
MouseArea { MouseArea {
id: resizeArea id: resizeArea
hoverEnabled: true hoverEnabled: true
@ -991,9 +991,9 @@ ApplicationWindow {
appWindow.width -= dx appWindow.width -= dx
else appWindow.width = parent.maxWidth else appWindow.width = parent.maxWidth
if(appWindow.height - dy > parent.maxHeight) if(appWindow.height - dy > parent.minHeight)
appWindow.height -= dy appWindow.height -= dy
else appWindow.height = parent.maxHeight else appWindow.height = parent.minHeight
previousPosition = pos previousPosition = pos
} }
} }