Skip to content
Snippets Groups Projects
Commit 441d695f authored by konstantin.kukharenko's avatar konstantin.kukharenko Committed by andrey.daragan
Browse files

Feature 2798

parent f85336c8
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,14 @@ Button { ...@@ -34,6 +34,14 @@ Button {
property bool existenceImage:true property bool existenceImage:true
///@detalis horizontalAligmentText Horizontal alignment. ///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:templateText.horizontalAlignment property alias horizontalAligmentText:templateText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color.
property alias colorBackgroundButton: dapBackgroundButton.color
///@detalis colorTextButton This property overrides the color of the text.
property alias colorTextButton: templateText.color
///@detalis borderColorButton Sets the color of the border.
property string borderColorButton: "#000000"
///@detalis borderWidthButton Sets the width of the border.
property int borderWidthButton: 0
id: dapButton id: dapButton
...@@ -43,7 +51,8 @@ Button { ...@@ -43,7 +51,8 @@ Button {
color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal
implicitWidth: widthButton implicitWidth: widthButton
implicitHeight: heightButton implicitHeight: heightButton
border.color: borderColorButton
border.width: borderWidthButton
///button text ///button text
Text { Text {
id: templateText id: templateText
......
import QtQuick 2.0
import QtQuick.Controls 2.5
ItemDelegate {
property string delegateContentText: ""
width: parent.width
height:{
if(index == currentIndex) return 0
else return 42*pt
}
contentItem: Text {
id:textDelegateComboBox
anchors.fill: parent
anchors.topMargin: 8 * pt
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
verticalAlignment: Qt.AlignTop
font.family: fontRobotoRegular.name
font.pixelSize: fontSizeComboBox
text: {if(index != currentIndex) return delegateContentText;}
color: hovered ? hilightColorText : normalColorText
}
background: Rectangle {
anchors.fill: parent
anchors.bottomMargin: 10 * pt
color: hovered ? hilightColor : normalColor
}
highlighted: parent.highlightedIndex === index
}
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