diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-04-25 13:05:54 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-04-25 13:05:54 -0500 |
| commit | fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d (patch) | |
| tree | cbbe7fc3e3950354f7a4dcb925b6e1e9dc62efd8 /components/ProgressBar.qml | |
| parent | 358e1d23facbd10fefbb2bf04c45b98f0c728ad0 (diff) | |
| parent | 42f7afaefddbf5a7929ddf88dbe7b27e7f40a669 (diff) | |
| download | monzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.tar.gz monzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.tar.xz monzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.zip | |
Merge pull request #2060
42f7afa White theme (xmrdsc)
Diffstat (limited to 'components/ProgressBar.qml')
| -rw-r--r-- | components/ProgressBar.qml | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/components/ProgressBar.qml b/components/ProgressBar.qml index 94447fc2..491727d5 100644 --- a/components/ProgressBar.qml +++ b/components/ProgressBar.qml @@ -26,7 +26,7 @@ // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import QtQuick 2.0 +import QtQuick 2.9 import moneroComponents.Wallet 1.0 import "../components" as MoneroComponents @@ -46,8 +46,10 @@ Rectangle { fillLevel = progressLevel if(typeof statusTxt != "undefined" && statusTxt != "") { progressText.text = statusTxt; + progressTextValue.text = ""; } else { - progressText.text = syncText + remaining.toFixed(0); + progressText.text = syncText; + progressTextValue.text = remaining.toFixed(0); } } } @@ -59,31 +61,30 @@ Rectangle { anchors.rightMargin: 15 * scaleRatio anchors.fill: parent - Text { + MoneroComponents.TextPlain { id: progressText anchors.top: parent.top anchors.topMargin: 6 font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 13 * scaleRatio - font.bold: true - color: "white" + font.bold: MoneroComponents.Style.progressBarProgressTextBold + color: MoneroComponents.Style.defaultFontColor text: qsTr("Synchronizing %1").arg(syncType) + translationManager.emptyString height: 18 * scaleRatio } - Text { + MoneroComponents.TextPlain { id: progressTextValue anchors.top: parent.top anchors.topMargin: 6 anchors.right: parent.right font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 13 * scaleRatio - font.bold: true - color: "white" + font.bold: MoneroComponents.Style.progressBarProgressTextBold + color: MoneroComponents.Style.defaultFontColor height:18 * scaleRatio } - Rectangle { id: bar anchors.left: parent.left @@ -92,7 +93,24 @@ Rectangle { anchors.topMargin: 4 height: 8 * scaleRatio radius: 8 * scaleRatio - color: "#333333" // progressbar bg + color: MoneroComponents.Style.progressBarBackgroundColor + + states: [ + State { + name: "black"; + when: MoneroComponents.Style.blackTheme + PropertyChanges { target: bar; color: MoneroComponents.Style._b_progressBarBackgroundColor} + }, State { + name: "white"; + when: !MoneroComponents.Style.blackTheme + PropertyChanges { target: bar; color: MoneroComponents.Style._w_progressBarBackgroundColor} + } + ] + + transitions: Transition { + enabled: appWindow.themeTransition + ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 300 } + } Rectangle { id: fillRect @@ -103,7 +121,6 @@ Rectangle { property int maxWidth: bar.width * scaleRatio width: (maxWidth * fillLevel) / 100 radius: 8 - // could change color based on progressbar status; if(item.fillLevel < 99 ) color: "#FA6800" } @@ -116,7 +133,4 @@ Rectangle { } } - - - } |
