feat(StatusDropdown): Basic dropdown template
This commit is contained in:
parent
96dad45f70
commit
7df9e18840
|
@ -15,6 +15,7 @@
|
||||||
\li \l{StatusChatInfoButton}
|
\li \l{StatusChatInfoButton}
|
||||||
\li \l{StatusChatListCategoryItemButton}
|
\li \l{StatusChatListCategoryItemButton}
|
||||||
\li \l{StatusColorSelector}
|
\li \l{StatusColorSelector}
|
||||||
|
\li \l{StatusDropdown}
|
||||||
\li \l{StatusIconTabButton}
|
\li \l{StatusIconTabButton}
|
||||||
\li \l{StatusNavBarTabButton}
|
\li \l{StatusNavBarTabButton}
|
||||||
\li \l{StatusTabBarIconButton}
|
\li \l{StatusTabBarIconButton}
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
import QtQuick 2.13
|
||||||
|
import QtGraphicalEffects 1.13
|
||||||
|
import QtQuick.Controls 2.14 as QC
|
||||||
|
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\qmltype StatusDropdown
|
||||||
|
\inherits Popup
|
||||||
|
\inqmlmodule StatusQ.Popups
|
||||||
|
\since StatusQ.Popups 0.1
|
||||||
|
\brief The StatusDropdown provides a template for creating dropdowns.
|
||||||
|
|
||||||
|
NOTE: Each consumer needs to set the x and y postion of the dropdown.
|
||||||
|
|
||||||
|
Example of how to use it:
|
||||||
|
|
||||||
|
\qml
|
||||||
|
StatusDropdown {
|
||||||
|
x: root.x + margins
|
||||||
|
y: root.y + margins
|
||||||
|
contentItem: ColumnLayout {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\endqml
|
||||||
|
|
||||||
|
For a list of components available see StatusQ.
|
||||||
|
*/
|
||||||
|
QC.Popup {
|
||||||
|
dim: false
|
||||||
|
closePolicy: QC.Popup.CloseOnPressOutside | QC.Popup.CloseOnEscape
|
||||||
|
background: Rectangle {
|
||||||
|
id: border
|
||||||
|
color: Theme.palette.statusPopupMenu.backgroundColor
|
||||||
|
radius: 8
|
||||||
|
border.color: "transparent"
|
||||||
|
layer.enabled: true
|
||||||
|
layer.effect: DropShadow {
|
||||||
|
source: border
|
||||||
|
horizontalOffset: 0
|
||||||
|
verticalOffset: 4
|
||||||
|
radius: 12
|
||||||
|
samples: 25
|
||||||
|
spread: 0.2
|
||||||
|
color: Theme.palette.dropShadow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -10510,5 +10510,6 @@
|
||||||
<file>src/StatusQ/Popups/Dialog/StatusDialogHeader.qml</file>
|
<file>src/StatusQ/Popups/Dialog/StatusDialogHeader.qml</file>
|
||||||
<file>src/StatusQ/Popups/Dialog/StatusDialogFooter.qml</file>
|
<file>src/StatusQ/Popups/Dialog/StatusDialogFooter.qml</file>
|
||||||
<file>src/StatusQ/Popups/Dialog/StatusDialogDivider.qml</file>
|
<file>src/StatusQ/Popups/Dialog/StatusDialogDivider.qml</file>
|
||||||
|
<file>src/StatusQ/Controls/StatusDropdown.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in New Issue