Skip to content
Snippets Groups Projects
Commit 664f8361 authored by Andrey Daragan's avatar Andrey Daragan
Browse files

[+] Refining library widgets.

parent 82ea64c9
No related branches found
No related tags found
1 merge request!11Cellframe clone
Showing
with 52 additions and 791 deletions
...@@ -42,9 +42,6 @@ ...@@ -42,9 +42,6 @@
<file>res/icons/new-wallet_icon_dark.png</file> <file>res/icons/new-wallet_icon_dark.png</file>
<file>res/icons/new-wallet_icon_dark_hover.png</file> <file>res/icons/new-wallet_icon_dark_hover.png</file>
<file>res/icons/icon_arrow_down.png</file> <file>res/icons/icon_arrow_down.png</file>
<file>screen/DapUiQmlScreen.qml</file>
<file>screen/DapUiQmlScreenMainWindow.qml</file>
<file>screen/DapUiQmlScreenMainWindowForm.ui.qml</file>
<file>screen/main.qml</file> <file>screen/main.qml</file>
<file>screen/Console/DapUiQmlScreenConsoleForm.ui.qml</file> <file>screen/Console/DapUiQmlScreenConsoleForm.ui.qml</file>
<file>screen/Console/DapUiQmlWidgetConsole.qml</file> <file>screen/Console/DapUiQmlWidgetConsole.qml</file>
...@@ -52,11 +49,6 @@ ...@@ -52,11 +49,6 @@
<file>screen/Console/DapUiQmlWidgetConsoleLastActionsDelegateForm.qml</file> <file>screen/Console/DapUiQmlWidgetConsoleLastActionsDelegateForm.qml</file>
<file>screen/Console/DapUiQmlWidgetConsoleLastActionsForm.qml</file> <file>screen/Console/DapUiQmlWidgetConsoleLastActionsForm.qml</file>
<file>screen/Dashboard/DapUiQmlScreenDashboard.qml</file> <file>screen/Dashboard/DapUiQmlScreenDashboard.qml</file>
<file>screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml</file>
<file>screen/Exchange/DapUiQmlWidgetExchangeOrderButtonForm.ui.qml</file>
<file>screen/Exchange/DapUiQmlWidgetExchangeOrderContentForm.ui.qml</file>
<file>screen/Exchange/DapUiQmlWidgetExchangeOrderForm.ui.qml</file>
<file>screen/Exchange/DapUiQmlWidgetExchangeOrderTitleForm.ui.qml</file>
<file>screen/Explorer/DapUiQmlWidgetNodeNetworkExplorer.qml</file> <file>screen/Explorer/DapUiQmlWidgetNodeNetworkExplorer.qml</file>
<file>screen/History/DapUiQmlScreenHistory.qml</file> <file>screen/History/DapUiQmlScreenHistory.qml</file>
<file>screen/History/DapUiQmlScreenHistoryForm.ui.qml</file> <file>screen/History/DapUiQmlScreenHistoryForm.ui.qml</file>
...@@ -86,8 +78,6 @@ ...@@ -86,8 +78,6 @@
<file>screen/Settings/DapUiQmlScreenSettingsSection.qml</file> <file>screen/Settings/DapUiQmlScreenSettingsSection.qml</file>
<file>screen/Settings/DapUiQmlWidgetSettingsNetwork.qml</file> <file>screen/Settings/DapUiQmlWidgetSettingsNetwork.qml</file>
<file>screen/Settings/DapUiQmlWidgetSettingsNetworkForm.ui.qml</file> <file>screen/Settings/DapUiQmlWidgetSettingsNetworkForm.ui.qml</file>
<file>screen/StatusBar/DapUiQmlWidgetStatusBar.qml</file>
<file>screen/StatusBar/DapUiQmlWidgetStatusBarButtonForm.ui.qml</file>
<file>screen/VPN/DapUiQmlScreenVpn.qml</file> <file>screen/VPN/DapUiQmlScreenVpn.qml</file>
<file>screen/VPN/DapUiQmlScreenVpnForm.ui.qml</file> <file>screen/VPN/DapUiQmlScreenVpnForm.ui.qml</file>
<file>screen/VPN/DapUiQmlWidgetSettingsVpn.qml</file> <file>screen/VPN/DapUiQmlWidgetSettingsVpn.qml</file>
......
import QtQuick 2.4 import QtQuick 2.4
DapMainApplicationWindowForm { DapMainApplicationWindowForm
{
menuTabWidget.onPuthScreenChanged:
{
screens.setSource(Qt.resolvedUrl(menuTabWidget.c))
var s = page
console.log(page)
}
} }
import QtQuick 2.0
import "LastAction"
Rectangle {
property DapUiQmlWidgetRightPanel rightPanel
}
import QtQuick 2.0
import QtQuick.Controls 1.4
DapUiQmlScreenMainWindowForm {
id: dapQmlScreenMainWindow
Component {
id: componentItemMainMenuTab
Rectangle {
id: componentItem
property bool isPushed: listViewTabs.currentIndex === index
width: 180 * pt
height: 60 * pt
color: "transparent"
Image
{
id: imageItem
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 24 * pt
source: model.normal
height: 18 * pt
width: 18 * pt
}
Text {
id: textItemMenu
anchors.verticalCenter: parent.verticalCenter
anchors.left: imageItem.right
anchors.leftMargin: 18 * pt
text: name
font.family: fontRobotoLight.name
font.pixelSize: 16 * pt
color: "#FFFFFF"
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
if(!componentItem.isPushed)
{
imageItem.source = model.hover;
textItemMenu.font.family = fontRobotoRegular.name;
}
}
onExited: {
if(!componentItem.isPushed)
{
imageItem.source = model.normal
textItemMenu.font.family = fontRobotoLight.name;
}
}
onClicked: {
listViewTabs.currentIndex = index;
rightPanel.header.clear(StackView.Immediate);
rightPanel.content.clear(StackView.Immediate);
var headerData = panelHeader;
var contentData = panelContent;
if(panelHeader !== "" || panelContent !== "")
{
rightPanel.visible = true;
if(headerData !== "") rightPanel.header.push(Qt.resolvedUrl(headerData));
if(contentData !== "") rightPanel.content.push(Qt.resolvedUrl(contentData));
}
else rightPanel.visible = false;
stackViewScreenDashboard.setSource(Qt.resolvedUrl(page), {"rightPanel": rightPanel});
}
}
onIsPushedChanged: {
componentItem.color = (isPushed ? "#D51F5D" : "transparent");
imageItem.source = isPushed ? model.hover : model.normal;
textItemMenu.font.family = (isPushed ? fontRobotoRegular.name : fontRobotoLight.name);
}
}
}
}
import QtQuick 2.0
import QtQuick.Controls 2.0
import "./StatusBar"
import "./LastAction"
Page {
id: dapUiQmlScreenMainWindow
title: qsTr("General")
/// ----------- Load fonts -----------
/// using example: font.family: fontRobotoLight.name
readonly property FontLoader fontRobotoLight: FontLoader {
source: "qrc:/res/fonts/roboto_light.ttf"
}
readonly property FontLoader fontRobotoRegular: FontLoader {
source: "qrc:/res/fonts/roboto_regular.ttf"
}
readonly property FontLoader fontRobotoMedium: FontLoader {
source: "qrc:/res/fonts/roboto_medium.ttf"
}
/// -----------
property alias listViewTabs: listViewTabs
property alias stackViewScreenDashboard: stackViewScreenDashboard
property alias rightPanel : rightPanel
DapUiQmlWidgetStatusBar {
id: rectangleStatusBar
anchors.left: rectangleTabsBorder.right
anchors.top: parent.top
anchors.right: parent.right
color: "#070023"
height: 60 * pt
}
Rectangle {
id: rectangleTabsBorder
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
color: "#070023"
width: 160 * pt
ListView {
id: listViewTabs
anchors.fill: parent
anchors.topMargin: 60 * pt
model: listModelTabs
spacing: 3
ListModel {
id: listModelTabs
ListElement {
name: qsTr("Dashboard")
page: "qrc:/screen/Dashboard/DapUiQmlScreenDashboard.qml"
normal: "qrc:/res/icons/icon_dashboard.png"
hover: "qrc:/res/icons/icon_dashboard_hover.png"
panelHeader: "qrc:/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml"
panelContent: "qrc:/screen/LastAction/DapUiQmlWidgetHistoryLastActions.qml"
}
ListElement {
name: qsTr("Exchange")
page: "qrc:/screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml"
normal: "qrc:/res/icons/icon_exchange.png"
hover: "qrc:/res/icons/icon_exchange_hover.png"
panelHeader: ""
panelContent: ""
}
ListElement {
name: qsTr("History")
page: "qrc:/screen/History/DapUiQmlScreenHistory.qml"
normal: "qrc:/res/icons/icon_history.png"
hover: "qrc:/res/icons/icon_history_hover.png"
panelHeader: ""
panelContent: ""
}
ListElement {
name: qsTr("Console")
page: "qrc:/screen/Console/DapUiQmlScreenConsoleForm.ui.qml"
normal: "qrc:/res/icons/icon_console.png"
hover: "qrc:/res/icons/icon_console_hover.png"
panelHeader: "qrc:/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml"
panelContent: "qrc:/screen/Console/DapUiQmlWidgetConsoleLastActionsForm.qml"
}
ListElement {
name: qsTr("Logs")
page: "qrc:/screen/Log/DapUiQmlWidgetChainNodeLogs.qml"
normal: "qrc:/res/icons/icon_logs.png"
hover: "qrc:/res/icons/icon_logs_hover.png"
panelHeader: ""
panelContent: ""
}
ListElement {
name: qsTr("Settings")
page: "qrc:/screen/Settings/DapUiQmlScreenSettings.qml"
normal: "qrc:/res/icons/icon_settings.png"
hover: "qrc:/res/icons/icon_settings_hover.png"
panelHeader: ""
panelContent: ""
}
ListElement {
name: qsTr("VPN")
page: "qrc:/screen/VPN/DapUiQmlScreenVpn.qml"
normal: "qrc:/res/icons/defaul_icon.png"
hover: "qrc:/res/icons/defaul_icon.png"
panelHeader: ""
panelContent: ""
}
/// TODO: It wasn't in the task. I will not delete it, maybe later
/// we will need it
// ListElement {
// name: qsTr("About")
// page: "DapQmlScreenAbout.qml"
// source: "qrc:/Resources/Icons/defaul_icon.png"
// }
}
delegate: componentItemMainMenuTab
clip: true
interactive: false
}
focus: true
}
Rectangle {
id: mainDashboard
anchors.left: rectangleTabsBorder.right
anchors.top: rectangleStatusBar.bottom
anchors.bottom: parent.bottom
anchors.right: parent.right
Loader {
id: stackViewScreenDashboard
clip: true
anchors.left: parent.left
anchors.right: rightPanel.left
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "qrc:/screen/Dashboard/DapUiQmlScreenDashboard.qml"
}
DapUiQmlWidgetRightPanel {
id: rightPanel
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.right: parent.right
header.initialItem: "qrc:/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml"
content.initialItem: "qrc:/screen/LastAction/DapUiQmlWidgetHistoryLastActions.qml"
}
}
}
...@@ -6,4 +6,18 @@ DapTabForm { ...@@ -6,4 +6,18 @@ DapTabForm {
anchors.fill: parent anchors.fill: parent
topPanelForm: DapDashboardTopPanel { }
} }
/*##^## Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/
import QtQuick 2.4 import QtQuick 2.4
import "qrc:/"
Item { DapTopPanel
width: 400 {
height: 400 anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
height: 60 * pt
frame.color: "#070023"
} }
import QtQuick 2.4 import QtQuick 2.4
import "qrc:/"
Item { DapTab {
width: 400
height: 400 topPanelForm: DapExchangeTopPanelForm { }
} }
/*##^## Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/
import QtQuick 2.4 import QtQuick 2.4
import "qrc:/"
Item { DapTopPanel {
width: 400 frame.color: "#070023"
height: 400
} }
import QtQuick 2.0
import QtQuick.Controls 2.0
import "../../"
Page {
///Top panel in tab Exchange
Rectangle{
id:topPanelExchange
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: 24*pt
anchors.topMargin: 12*pt
anchors.rightMargin: 24*pt
height:30 * pt
///Token ComboBox
Rectangle{
id:leftComboBox
anchors.top: topPanelExchange.top
anchors.left: topPanelExchange.left
width:112 * pt
height:parent.height
DapComboBox{
model: ListModel{
id:сonversionList
ListElement{text:"TKN1/NGD"}
ListElement{text:"TKN2/NGD"}
ListElement{text:"NGD/KLVN"}
ListElement{text:"KLVN/USD"}
}
fontSizeComboBox: 16*pt
widthPopupComboBoxActive: 144 *pt
widthPopupComboBoxNormal: 112 *pt
sidePaddingActive: 16*pt
sidePaddingNormal: 0
x:popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal
topIndentActive:12 * pt
bottomIndentActive:14 * pt
heightComboBoxNormal:24 * pt
heightComboBoxActive:44 * pt
bottomIntervalListElement:6 * pt
}
}
///Time ComboBox
Rectangle{
id:rightComboBox
anchors.left: leftComboBox.right
anchors.leftMargin: 72*pt
anchors.top: topPanelExchange.top
width:100 * pt
height:parent.height
DapComboBox{
model: ListModel{
ListElement{text:"1 minute"}
ListElement{text:"5 minute"}
ListElement{text:"15 minute"}
ListElement{text:"30 minute"}
ListElement{text:"1 hour"}
ListElement{text:"4 hour"}
ListElement{text:"12 hour"}
ListElement{text:"24 hour"}
}
fontSizeComboBox: 14*pt
widthPopupComboBoxActive: 132 *pt
widthPopupComboBoxNormal: 100 *pt
sidePaddingActive: 16*pt
sidePaddingNormal: 0
x:popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal
topIndentActive:12 * pt
bottomIndentActive:14 * pt
heightComboBoxNormal:24 * pt
heightComboBoxActive:44 * pt
bottomIntervalListElement:6 * pt
}
}
///Value Last price
Rectangle{
id: lastPrice
height: parent.height
width: 150*pt
anchors.right: volume24.left
anchors.rightMargin: 30 * pt
Text{
anchors.left: lastPrice.left
anchors.bottom: value_lastPrice.top
anchors.bottomMargin: 6 * pt
color: "#757184"
font.pixelSize: 10 * pt
font.family: fontRobotoRegular.name
text: qsTr("Last price")
}
Text {
id: value_lastPrice
anchors.left: lastPrice.left
anchors.bottom: lastPrice.bottom
color: "#070023"
font.pixelSize: 12 * pt
font.family: fontRobotoRegular.name
text: qsTr("$ 10 807.35 NGD")
}
Text {
anchors.left: value_lastPrice.right
anchors.bottom: lastPrice.bottom
anchors.leftMargin: 6 * pt
color: "#6F9F00"
font.pixelSize: 10 * pt
font.family: fontRobotoRegular.name
text: qsTr("+3.59%")
}
}
///Value 24h volume
Rectangle{
id: volume24
height: parent.height
width: 75*pt
anchors.right: topPanelExchange.right
Text{
anchors.right: volume24.right
anchors.bottom: value_valume24.top
anchors.bottomMargin: 6 * pt
color: "#757184"
font.pixelSize: 10 * pt
font.family: fontRobotoRegular.name
text: qsTr("24h volume")
}
Text {
id: value_valume24
anchors.right: volume24.right
anchors.bottom: volume24.bottom
color: "#070023"
font.pixelSize: 12 * pt
font.family: fontRobotoRegular.name
text: qsTr("9 800 TKN1")
}
}
}
///Left down panel
Row {
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.leftMargin: 28 * pt
anchors.bottomMargin: 42 * pt
spacing: 68 * pt
DapUiQmlWidgetExchangeOrderForm {
titleOrder: qsTr("Buy")
}
DapUiQmlWidgetExchangeOrderForm {
titleOrder: qsTr("Sell")
}
}
}
import QtQuick 2.0
import QtQuick.Controls 2.0
Button {
property alias buttonFont: buttonText.font.family
property alias buttonText: buttonText.text
id: buttonBuy
width: 70 * pt
height: 30 * pt
contentItem: Text {
id: buttonText
color: "#FFFFFF"
font.pixelSize: 14 * pt
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
implicitWidth: parent.width
implicitHeight: parent.height
color: buttonBuy.hovered ? "#A2A4A7" : "#4F5357"
}
}
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
property string contentFont: ""
width: childrenRect.width
height: childrenRect.height
ColumnLayout {
spacing: 16 * pt
Repeater {
model: [qsTr("Ammount"), qsTr("Price"), qsTr("Total"), qsTr("Fee (0.2%)"), qsTr("Total+Fee")]
RowLayout {
spacing: 0
Rectangle {
height: childrenRect.height
width: 120 * pt
Text {
text: modelData
color: "#ACACAF"
font.family: contentFont
font.pixelSize: 12 * pt
}
}
Rectangle {
width: 130 * pt
height: 22 * pt
border.width: 1 * pt
border.color: "#B0B1B5"
TextInput {
id: currencyTextInput
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: textCurrency.left
anchors.leftMargin: 6 * pt
anchors.rightMargin: 6 * pt
color: readOnly ? "#ACACAF" : "#737880"
font.family: contentFont
font.pixelSize: 12 * pt
verticalAlignment: Qt.AlignVCenter
validator: RegExpValidator{ regExp: /\d+/ }
clip: true
readOnly: index === 3 || index === 4
text: readOnly ? "0" : ""
}
Text {
id: textCurrency
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.rightMargin: 6 * pt
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignRight
color: currencyTextInput.readOnly ? "#ACACAF" : "#737880"
font.family: contentFont
font.pixelSize: 12 * pt
text: index === 0 ? currencyName : qsTr("USD")
}
}
}
}
}
}
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
property alias titleOrder: orderTitle.orderText
property string currencyName: qsTr("KLVN")
property string balance: "0"
width: childrenRect.width
height: childrenRect.height
ColumnLayout {
DapUiQmlWidgetExchangeOrderTitleForm {
id: orderTitle
orderFont: "Roboto"
}
Text {
text: qsTr("Balance: ") + balance + " " + currencyName
color: "#ACACAF"
font.family: "Roboto"
font.pixelSize: 12 * pt
}
Rectangle {
width: parent.width
height: 6 * pt
}
DapUiQmlWidgetExchangeOrderContentForm {
contentFont: "Roboto"
}
Rectangle {
height: 12 * pt
width: parent.width
}
DapUiQmlWidgetExchangeOrderButtonForm {
buttonFont: "Roboto"
buttonText: titleOrder
}
}
}
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
property alias orderText: textOrder.text
property alias orderFont: textOrder.font.family
width: childrenRect.width
height: childrenRect.height
RowLayout {
spacing: 8 * pt
Rectangle {
width: 32
height: 32
border.color: "#000000"
border.width: 1
Image {
anchors.fill: parent
}
}
Text {
id: textOrder
color: "#4F5357"
font.pixelSize: 14 * pt
}
}
}
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.3
import "../../"
Rectangle {
height:60 * pt
anchors{
top: parent.top
left: parent.left
right: parent.right
}
color: "transparent"
Row {
anchors.fill: parent
Label {
id:labelWaletStatusBar
text: qsTr("Wallet")
anchors.left: parent.left
anchors.leftMargin: 48 * pt
anchors.top: parent.top
anchors.bottom: parent.bottom
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignLeft
font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt
color: "#ACAAB5"
}
Rectangle{
id:combBoxStatusBar
anchors.left:labelWaletStatusBar.right
anchors.leftMargin:30 * pt
anchors.top: parent.top
anchors.bottom: parent.bottom
width:148 * pt
color: "transparent"
DapComboBox {
id: comboboxWallet
// property Label fieldBalance: Label {}
// model: dapWalletModel.wallets
///Demo model
model: ListModel{
id:сonversionList
ListElement{text:"all wallets"}
ListElement{text:"Money for children"}
ListElement{text:"Money for education"}
ListElement{text:"Money for medicine"}
}
indicatorImageNormal: "qrc:/res/icons/ic_arrow_drop_down.png"
indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up.png"
sidePaddingNormal:0 * pt
sidePaddingActive:16 * pt
topIndentActive:10 * pt
normalColorText:"#070023"
hilightColorText:"#FFFFFF"
normalColorTopText:"#FFFFFF"
hilightColorTopText:"#070023"
hilightColor: "#330F54"
normalTopColor: "#070023"
fontSizeComboBox: 14*px
widthPopupComboBoxNormal:148 * pt
widthPopupComboBoxActive:180 * pt
heightComboBoxNormal:24 * pt
heightComboBoxActive:44 * pt
bottomIntervalListElement:8 * pt
topEffect:false
x:popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal
}
}
Label {
id: titleWalletBalance
anchors.left: combBoxStatusBar.right
anchors.leftMargin: 70 * pt
anchors.top: parent.top
anchors.bottom: parent.bottom
verticalAlignment: Qt.AlignVCenter
text: qsTr("Wallet balance:")
font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt
color: "#ACAAB5"
}
Label {
id: fieldWalletBalance
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: titleWalletBalance.right
anchors.leftMargin: 18 * pt
verticalAlignment: Qt.AlignVCenter
font.family: fontRobotoRegular.name
font.pixelSize: 16 * pt
color: "#FFFFFF"
///DemoDate
text: "$ 3 050 745.3453289 USD"
// text: dapChainConvertor.toConvertCurrency(
// dapWalletModel.walletBalance(comboboxWallet.currentText))
}
}
DapUiQmlWidgetStatusBarButtonForm {
id: statusBarAddWalletButton
visible: rightPanel.visible ? true : false
width: rightPanel.visible ? 120 * pt : 0
height: 36 * pt
name: qsTr("New wallet")
fontHeight: 14 * pt
backgroundColor: hovered ? "#D51F5D" : "#070023"
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 10 * pt
anchors.rightMargin: 20 * pt
anchors.bottom: parent.bottom
anchors.bottomMargin: 10 * pt
onClicked: {
rightPanel.header.push("qrc:/screen/LastAction/DapUiQmlScreenDialogAddWalletHeader.qml", {"rightPanel": rightPanel});
rightPanel.content.push("qrc:/screen/LastAction/DapUiQmlScreenDialogAddWallet.qml", {"rightPanel": rightPanel});
statusBarAddWalletButton.backgroundColor = "#D51F5D"
}
Connections {
target: rightPanel.header.currentItem
onPressedCloseAddWalletChanged: statusBarAddWalletButton.backgroundColor = "#070023"
}
}
}
import QtQuick 2.0
import QtQuick.Controls 2.0
Button {
property alias name: templateText.text
property alias fontHeight: templateText.font.pixelSize
property alias backgroundColor: background.color
property int defaultHeight: 50 * pt
property int defaultWidth: 100 * pt
property string normalButton: "qrc:/res/icons/new-wallet_icon_dark.png"
property string hoverButton: "qrc:/res/icons/new-wallet_icon_dark_hover.png"
id: button
width: defaultHeight
height: defaultWidth
contentItem: Rectangle {
id: background
anchors.fill: parent
color: "#070023"
Text {
id: templateText
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
anchors.rightMargin: 20 * pt
font.family: "Roboto"
font.weight: Font.Normal
color: "#FFFFFF"
text: qsTr("template")
}
Image {
id: iconNewWallet
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10 * pt
source: button.hovered ? hoverButton : normalButton
width: 28 * pt
height: 28 * pt
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment