Skip to content
Snippets Groups Projects
Commit d1fd8ee7 authored by littletux89@gmail.com's avatar littletux89@gmail.com
Browse files

[*] Formatted comments.

parent 4aa8879b
No related branches found
No related tags found
1 merge request!6Feature 2798
This commit is part of merge request !6. Comments created here will be created in the context of that merge request.
......@@ -2,37 +2,37 @@ import QtQuick 2.0
import QtQuick.Controls 2.0
Button {
///@detalis heightButton Button height
///@detalis heightButton Button height.
property int heightButton: 36 * pt
///@detalis widthButton Button width
///@detalis widthButton Button width.
property int widthButton: 120 * pt
///@detalis normalImageButton the picture on the Button is in normal state
///@detalis normalImageButton The picture on the Button is in normal state.
property string normalImageButton: "qrc:/res/icons/new-wallet_icon_dark.png"
///@detalis hoverImageButton the image on the Button is in the mouseover state
///@detalis hoverImageButton The image on the Button is in the mouseover state.
property string hoverImageButton: "qrc:/res/icons/new-wallet_icon_dark_hover.png"
///@detalis widthImageButton image width
///@detalis widthImageButton Image width.
property int widthImageButton: 28 * pt
///@detalis heightImageButton image height
///@detalis heightImageButton Image height.
property int heightImageButton: 28 * pt
///@detalis indentImageLeftButton: indentation of the image from the left edge
///@detalis indentImageLeftButton: Indentation of the image from the left edge.
property int indentImageLeftButton: 10 * pt
///@detalis colorBackgroundNormal Button background color in normal state
///@detalis colorBackgroundNormal Button background color in normal state.
property string colorBackgroundNormal:"#070023"
///@detalis colorBackgroundHover Button background color in hover state
///@detalis colorBackgroundHover Button background color in hover state.
property string colorBackgroundHover: "#D51F5D"
///@detalis textButton: text Button
///@detalis textButton Text button.
property string textButton: "New Wallet"
///@detalis colorButtonTextNormal Button text color in normal state
///@detalis colorButtonTextNormal Button text color in normal state.
property string colorButtonTextNormal: "#FFFFFF"
///@detalis colorButtonTextHover Button text color in hover state
///@detalis colorButtonTextHover Button text color in hover state.
property string colorButtonTextHover: "#FFFFFF"
///@detalis indentTextRight: indentation of the text from the right edge
///@detalis indentTextRight: Indentation of the text from the right edge.
property int indentTextRight: 20 * pt
///@detalis fontSizeButton: font size
///@detalis fontSizeButton Font size.
property int fontSizeButton: 14 * pt
///@detalis existenceImage: indicates the presence of an image
///@detalis existenceImage Indicates the presence of an image.
property bool existenceImage:true
///@detalis horizontalAligmentText: horizontal alignment
///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:templateText.horizontalAlignment
id: dapButton
......
import QtQuick 2.0
import QtQuick.Controls 2.0
DapComboBoxForm {
DapComboBoxForm
{
delegate:ItemDelegate
{
width: parent.width
delegate:ItemDelegate {
width: parent.width
///Adjusting the height of the line, taking into account that the second element from the end may be the last.
height:{
if(index != currentIndex)
{
if(index == customComboBox.count - 2)
//Adjusting the height of the line, taking into account that the second element from the end may be the last
height:{
if(index != currentIndex)
{
if(index+1 == currentIndex) return heightListElement + bottomIntervalListElement
else return heightListElement + intervalListElement
if(index == customComboBox.count - 2)
{
if(index+1 == currentIndex) return heightListElement + bottomIntervalListElement
else return heightListElement + intervalListElement
}
if (index == customComboBox.count - 1) return heightListElement + bottomIntervalListElement
return heightListElement + intervalListElement
}
if (index == customComboBox.count - 1) return heightListElement + bottomIntervalListElement
return heightListElement + intervalListElement
else return 0
}
//Text item
contentItem: Text {
id:textDelegateComboBox
anchors.fill: parent
anchors.topMargin: paddingTopItemDelegate
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
font.family: fontRobotoRegular.name
font.pixelSize: fontSizeComboBox
text: {if(index != currentIndex) return modelData;}
color: hovered ? hilightColorText : normalColorText
}
else return 0
}
///Text item
contentItem: Text {
id:textDelegateComboBox
anchors.fill: parent
anchors.topMargin: paddingTopItemDelegate
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
font.family: fontRobotoRegular.name
font.pixelSize: fontSizeComboBox
text: {if(index != currentIndex) return modelData;}
color: hovered ? hilightColorText : normalColorText
}
//Indent from the bottom edge or the next line that will not stand out when you hover over the mouse
background: Rectangle {
anchors.fill: parent
anchors.bottomMargin: {
if(index == countComboBox - 2)
{
if(index+1 == currentIndex) return bottomIntervalListElement
else return intervalListElement
//Indent from the bottom edge or the next line that will not stand out when you hover over the mouse
background: Rectangle {
anchors.fill: parent
anchors.bottomMargin: {
if(index == countComboBox - 2)
{
if(index+1 == currentIndex) return bottomIntervalListElement
else return intervalListElement
}
if (index == countComboBox - 1) return bottomIntervalListElement
return intervalListElement
}
if (index == countComboBox - 1) return bottomIntervalListElement
return intervalListElement
color: hovered ? hilightColor : normalColor
}
color: hovered ? hilightColor : normalColor
highlighted: parent.highlightedIndex === index
}
highlighted: parent.highlightedIndex === index
}
}
......@@ -4,71 +4,70 @@ import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0
ComboBox {
///@detalis normalColorText text color in normal state
///@detalis normalColorText Text color in normal state.
property string normalColorText: "#070023"
///@detalis hilightColorText text color in selected state
///@detalis hilightColorText Text color in selected state.
property string hilightColorText: "#FFFFFF"
///@detalis normalColorTopText text color in the main line in normal state
///@detalis normalColorTopText Text color in the main line in normal state.
property string normalColorTopText: normalColorText
///@detalis hilightColorTopText text color in the main line in active state
///@detalis hilightColorTopText Text color in the main line in active state.
property string hilightColorTopText: normalColorText
///@detalis normalColor item color in normal state
///@detalis normalColor Item color in normal state.
property string normalColor: "#FFFFFF"
///@detalis hilightColor item color in selected state
///@detalis hilightColor Item color in selected state.
property string hilightColor: "#330F54"
///@detalis normalTopColor top string color in normal state
///@detalis normalTopColor Top string color in normal state.
property string normalTopColor: normalColor
///@detalis hilightTopColor top string color in selected state
///@detalis hilightTopColor Top string color in selected state.
property string hilightTopColor: normalColor
///@detalis fontSizeComboBox font size for the entire widget
///@detalis fontSizeComboBox Font size for the entire widget.
property int fontSizeComboBox: 16 * pt
///@detalis widthPopupComboBoxNormal width of the combo box in the normal state
///@detalis widthPopupComboBoxNormal Width of the combo box in the normal state.
property int widthPopupComboBoxNormal: parent.width
///@detalis widthPopupComboBoxActive width of the ComboBox in the active state
///@detalis widthPopupComboBoxActive Width of the ComboBox in the active state.
property int widthPopupComboBoxActive: widthPopupComboBoxNormal
///@detalis heightComboBoxNormal height of the ComboBox in the normal state
///@detalis heightComboBoxNormal Height of the ComboBox in the normal state.
property int heightComboBoxNormal: parent.height
///@detalis heightComboBoxActive height of the ComboBox in the active state
///@detalis heightComboBoxActive Height of the ComboBox in the active state.
property int heightComboBoxActive: heightComboBoxNormal
///@detalis sidePaddingNormal: sets the indent from the edge of the right and left edges of the parent in the normal state
///@detalis sidePaddingNormal: Sets the indent from the edge of the right and left edges of the parent in the normal state.
property int sidePaddingNormal: 16 * pt
///@detalis sidePaddingActive sets the indent from the edge of the right and left edges of the parent in the active state
///@detalis sidePaddingActive Sets the indent from the edge of the right and left edges of the parent in the active state.
property int sidePaddingActive: sidePaddingNormal
///@detalis topIndentNormal sets the indent from the edge of the upper of the parent in the normal state
///@detalis topIndentNormal Sets the indent from the edge of the upper of the parent in the normal state.
property int topIndentNormal: 12 * pt
///@detalis topIndentActive sets the indent from the edge of the upper of the parent in the active state
///@detalis topIndentActive Sets the indent from the edge of the upper of the parent in the active state.
property int topIndentActive: topIndentNormal
///@detalis bottomIndentNormal sets the indent from the edge of the lower of the parent in the normal state
///@detalis bottomIndentNormal Sets the indent from the edge of the lower of the parent in the normal state.
property int bottomIndentNormal: 14 * pt
///@detalis bottomIndentActive sets the indent from the edge of the lower of the parent in the active state
///@detalis bottomIndentActive Sets the indent from the edge of the lower of the parent in the active state.
property int bottomIndentActive: bottomIndentNormal
///@detalis paddingTopItemDelegate indent above from item delegate
///@detalis paddingTopItemDelegate Indent above from item delegate.
property int paddingTopItemDelegate: 8 * pt
///@detalis paddingBottomItemDelegate indent below from item delegate
///@detalis paddingBottomItemDelegate Indent below from item delegate.
property int paddingBottomItemDelegate: paddingTopItemDelegate
///@detalis heightListElement list item height
///@detalis heightListElement List item height.
property int heightListElement: 32 * pt
///@detalis intervalListElement spacing between items in a list
///@detalis intervalListElement Spacing between items in a list.
property int intervalListElement: 10 * pt
///@detalis bottomIntervalListElement: spacing from bottom to bottom
///@detalis bottomIntervalListElement Spacing from bottom to bottom.
property int bottomIntervalListElement: intervalListElement
///@detalis topEffect using an effect for the top element
///@detalis topEffect Using an effect for the top element.
property bool topEffect: true
///@detalis indicatorImageNormal Indicator picture address for normal state
///@detalis indicatorImageNormal Indicator picture address for normal state.
property string indicatorImageNormal: "qrc:/res/icons/ic_arrow_drop_down_dark_blue.png"
///@detalis indicatorImageActive Indicator picture address for active state
///@detalis indicatorImageActive Indicator picture address for active state.
property string indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up_dark_blue.png"
///@detalis indicatorWidth Indicator width
///@detalis indicatorWidth Indicator width.
property int indicatorWidth: 24 * pt
///@detalis indicatorHeight Indicator height
///@detalis indicatorHeight Indicator height.
property int indicatorHeight: indicatorWidth
/// colorTopNormalDropShadow color of the shadow effect of the combo box when minimized
/// colorTopNormalDropShadow Color of the shadow effect of the combo box when minimized.
property string colorTopNormalDropShadow: "#00000000"
///@detalis colorDropShadow unboxed shadow color in expanded state
///@detalis colorDropShadow Unboxed shadow color in expanded state.
property string colorDropShadow: "#40ABABAB"
///@detalis countComboBox this variable indicates the number of lines in the list for
///the delegate in the file DapComboBox.qml
///the delegate in the file DapComboBox.qml.
property int countComboBox: customComboBox.count
id: customComboBox
......@@ -86,14 +85,14 @@ ComboBox {
anchors.rightMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
}
///Defining the background for the main line
//Defining the background for the main line
background: Rectangle {
anchors.fill: parent
color: parent.popup.visible ? hilightTopColor : normalTopColor
radius: 2 * pt
height: parent.height
}
///Main line text settings
//Main line text settings
contentItem: Text {
anchors.fill: parent
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
......@@ -104,7 +103,7 @@ ComboBox {
verticalAlignment: Text.AlignVCenter
}
///Customize drop-down list with shadow effect
//Customize drop-down list with shadow effect
popup: Popup {
y: parent.height - 1
width: parent.width + 1
......@@ -134,7 +133,7 @@ ComboBox {
}
}
///Shadow effect for the top element.
//Shadow effect for the top element.
DropShadow {
anchors.fill: if (topEffect)
parent
......
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