Skip to content
Snippets Groups Projects

Bugs 2893

Merged andrey.daragan requested to merge bugs-2893 into develop
3 files
+ 119
96
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 35
30
import QtQuick 2.0
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Controls 2.0
Button {
Button
 
{
///@detalis heightButton Button height.
///@detalis heightButton Button height.
property int heightButton
property int heightButton
///@detalis widthButton Button width.
///@detalis widthButton Button width.
@@ -31,7 +32,7 @@ Button {
@@ -31,7 +32,7 @@ Button {
///@detalis fontButton Font setting.
///@detalis fontButton Font setting.
property alias fontButton:buttonText.font
property alias fontButton:buttonText.font
///@detalis existenceImage Indicates the presence of an image.
///@detalis existenceImage Indicates the presence of an image.
property bool existenceImage:true
property bool existenceImage: true
///@detalis horizontalAligmentText Horizontal alignment.
///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:buttonText.horizontalAlignment
property alias horizontalAligmentText:buttonText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color.
///@detalis colorBackgroundButton This property overrides the background color.
@@ -45,34 +46,38 @@ Button {
@@ -45,34 +46,38 @@ Button {
id: dapButton
id: dapButton
contentItem: Rectangle {
contentItem:
id: dapBackgroundButton
Rectangle
anchors.fill: parent
{
color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal
id: dapBackgroundButton
implicitWidth: widthButton
implicitHeight: heightButton
border.color: borderColorButton
border.width: borderWidthButton
///button text
Text {
id: buttonText
anchors.fill: parent
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal
horizontalAlignment: Qt.AlignRight
implicitWidth: widthButton
anchors.rightMargin: indentTextRight
implicitHeight: heightButton
color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal
border.color: borderColorButton
text: qsTr(textButton)
border.width: borderWidthButton
 
///button text
 
Text
 
{
 
id: buttonText
 
anchors.fill: parent
 
verticalAlignment: Qt.AlignVCenter
 
horizontalAlignment: Qt.AlignRight
 
anchors.rightMargin: indentTextRight
 
color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal
 
text: qsTr(textButton)
 
}
 
 
///button picture
 
Image
 
{
 
id: iconNewWallet
 
anchors.verticalCenter: if(existenceImage)parent.verticalCenter
 
anchors.left: if(existenceImage)parent.left
 
anchors.leftMargin:if(existenceImage) indentImageLeftButton
 
source: if(existenceImage) dapButton.hovered ? hoverImageButton : normalImageButton
 
width: if(existenceImage)widthImageButton
 
height:if(existenceImage) heightImageButton
 
}
}
}
///button picture
Image {
id: iconNewWallet
anchors.verticalCenter: if(existenceImage)parent.verticalCenter
anchors.left: if(existenceImage)parent.left
anchors.leftMargin:if(existenceImage) indentImageLeftButton
source: if(existenceImage) dapButton.hovered ? hoverImageButton : normalImageButton
width: if(existenceImage)widthImageButton
height:if(existenceImage) heightImageButton
}
}
}
}
Loading