Skip to content
Snippets Groups Projects
Commit 0040a273 authored by andrey.daragan's avatar andrey.daragan
Browse files

Merge branch 'develop' into 'feature-2894'

# Conflicts:
#   widgets/DapButtonForm.ui.qml
#   widgets/DapComboBoxForm.ui.qml
parents 35158bf2 5773f522
No related branches found
No related tags found
1 merge request!10[+]add dapRadioButton
This commit is part of merge request !10. Comments created here will be created in the context of that merge request.
...@@ -31,7 +31,7 @@ Button { ...@@ -31,7 +31,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 +45,38 @@ Button { ...@@ -45,34 +45,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
}
}
} }
...@@ -3,7 +3,8 @@ import QtQuick.Controls 2.2 ...@@ -3,7 +3,8 @@ import QtQuick.Controls 2.2
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
ComboBox { ComboBox
{
///@detalis normalColorText Text color in normal state. ///@detalis normalColorText Text color in normal state.
property string normalColorText property string normalColorText
///@detalis hilightColorText Text color in selected state. ///@detalis hilightColorText Text color in selected state.
...@@ -73,77 +74,92 @@ ComboBox { ...@@ -73,77 +74,92 @@ ComboBox {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
//Icon icon near the text (arrow) //Icon icon near the text (arrow)
indicator: Image { indicator:
source: parent.popup.visible ? indicatorImageActive : indicatorImageNormal Image
width: indicatorWidth {
height: indicatorHeight source: parent.popup.visible ? indicatorImageActive : indicatorImageNormal
anchors.verticalCenter: parent.verticalCenter width: indicatorWidth
anchors.right: parent.right height: indicatorHeight
anchors.rightMargin: popup.visible ? sidePaddingActive : sidePaddingNormal anchors.verticalCenter: parent.verticalCenter
} anchors.right: parent.right
anchors.rightMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
}
//Defining the background for the main line //Defining the background for the main line
background: Rectangle { background:
anchors.fill: parent Rectangle
color: parent.popup.visible ? hilightTopColor : normalTopColor {
radius: 2 * pt anchors.fill: parent
height: parent.height color: parent.popup.visible ? hilightTopColor : normalTopColor
} radius: 2 * pt
height: parent.height
}
//Main line text settings //Main line text settings
contentItem: Text { contentItem:
id:textTopComboBox Text
anchors.fill: parent {
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal id:textTopComboBox
text: parent.displayText anchors.fill: parent
font: parent.font anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
color: popup.visible ? hilightColorTopText : normalColorTopText text: parent.displayText
verticalAlignment: Text.AlignVCenter font: parent.font
} color: popup.visible ? hilightColorTopText : normalColorTopText
verticalAlignment: Text.AlignVCenter
//Customize drop-down list with shadow effect
popup: Popup {
y: parent.height - 1
width: parent.width + 1
padding: 1
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: customComboBox.popup.visible ? customComboBox.delegateModel : null
ScrollIndicator.vertical: ScrollIndicator {}
} }
background: Rectangle { //Customize drop-down list with shadow effect
width: customComboBox.background.width popup:
color: normalColor Popup
Rectangle { {
id: contentCorner y: parent.height - 1
anchors.fill: parent width: parent.width + 1
} padding: 1
contentItem:
DropShadow { ListView
anchors.fill: parent {
source: contentCorner clip: true
verticalOffset: 9 * pt implicitHeight: contentHeight
samples: 13 * pt model: customComboBox.popup.visible ? customComboBox.delegateModel : null
color: colorDropShadow ScrollIndicator.vertical: ScrollIndicator {}
} }
background:
Rectangle
{
width: customComboBox.background.width
color: normalColor
Rectangle
{
id: contentCorner
anchors.fill: parent
}
DropShadow
{
anchors.fill: parent
source: contentCorner
verticalOffset: 9 * pt
samples: 13 * pt
color: colorDropShadow
}
}
} }
}
//Shadow effect for the top element. //Shadow effect for the top element.
DropShadow { DropShadow
anchors.fill: if (topEffect) {
parent anchors.fill: if (topEffect)
source: if (topEffect) parent
background source: if (topEffect)
verticalOffset: if (topEffect) background
9 * pt verticalOffset: if (topEffect)
9 * pt
else 0
samples: if (topEffect)
13 * pt
else 0 else 0
samples: if (topEffect) color: if (topEffect)
13 * pt customComboBox.popup.visible ? colorDropShadow : colorTopNormalDropShadow
else 0 else "#00000000"
color: if (topEffect) }
customComboBox.popup.visible ? colorDropShadow : colorTopNormalDropShadow
else "#00000000"
} }
}
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