Merge branch 'feature/new-gui' into bugfix/scroll_stuck_on_fl_textarea
This commit is contained in:
commit
29e8f8f5fb
99 changed files with 5221 additions and 715 deletions
|
@ -10,6 +10,8 @@ Item {
|
|||
property string text
|
||||
property string textColor: "#d7d8db"
|
||||
property string textDisabledColor: "#878B91"
|
||||
property int textMaximumLineCount: 2
|
||||
property int textElide: Qt.ElideRight
|
||||
|
||||
property string descriptionText
|
||||
property string descriptionTextColor: "#878B91"
|
||||
|
@ -102,6 +104,8 @@ Item {
|
|||
|
||||
color: root.enabled ? root.textColor : root.textDisabledColor
|
||||
text: root.text
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Item {
|
|||
property var actionButtonFunction
|
||||
|
||||
property string headerText
|
||||
property int headerTextMaximumLineCount: 2
|
||||
property int headerTextElide: Qt.ElideRight
|
||||
|
||||
property string descriptionText
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
|
@ -26,6 +29,8 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: root.headerText
|
||||
maximumLineCount: root.headerTextMaximumLineCount
|
||||
elide: root.headerTextElide
|
||||
}
|
||||
|
||||
ImageButtonType {
|
||||
|
|
|
@ -8,6 +8,9 @@ Item {
|
|||
id: root
|
||||
|
||||
property string text
|
||||
property int textMaximumLineCount: 2
|
||||
property int textElide: Qt.ElideRight
|
||||
|
||||
property string descriptionText
|
||||
|
||||
property var clickedFunction
|
||||
|
@ -68,6 +71,8 @@ Item {
|
|||
ListItemTitleType {
|
||||
text: root.text
|
||||
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
|
||||
opacity: root.textOpacity
|
||||
|
||||
|
|
|
@ -5,12 +5,15 @@ import QtQuick.Layouts
|
|||
import "TextTypes"
|
||||
|
||||
ListView {
|
||||
id: menuContent
|
||||
id: root
|
||||
|
||||
property var rootWidth
|
||||
|
||||
property var selectedText
|
||||
|
||||
property int textMaximumLineCount: 2
|
||||
property int textElide: Qt.ElideRight
|
||||
|
||||
property string imageSource: "qrc:/images/controls/check.svg"
|
||||
|
||||
property var clickedFunction
|
||||
|
@ -18,7 +21,7 @@ ListView {
|
|||
currentIndex: 0
|
||||
|
||||
width: rootWidth
|
||||
height: menuContent.contentItem.height
|
||||
height: root.contentItem.height
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
@ -27,6 +30,12 @@ ListView {
|
|||
id: buttonGroup
|
||||
}
|
||||
|
||||
function triggerCurrentItem() {
|
||||
var item = root.itemAtIndex(currentIndex)
|
||||
var radioButton = item.children[0].children[0]
|
||||
radioButton.clicked()
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: rootWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
@ -74,6 +83,9 @@ ListView {
|
|||
Layout.bottomMargin: 20
|
||||
|
||||
text: name
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
|
||||
}
|
||||
|
||||
Image {
|
||||
|
@ -88,11 +100,11 @@ ListView {
|
|||
}
|
||||
|
||||
ButtonGroup.group: buttonGroup
|
||||
checked: menuContent.currentIndex === index
|
||||
checked: root.currentIndex === index
|
||||
|
||||
onClicked: {
|
||||
menuContent.currentIndex = index
|
||||
menuContent.selectedText = name
|
||||
root.currentIndex = index
|
||||
root.selectedText = name
|
||||
if (clickedFunction && typeof clickedFunction === "function") {
|
||||
clickedFunction()
|
||||
}
|
||||
|
@ -101,8 +113,8 @@ ListView {
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (menuContent.currentIndex === index) {
|
||||
menuContent.selectedText = name
|
||||
if (root.currentIndex === index) {
|
||||
root.selectedText = name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ Rectangle {
|
|||
|
||||
property string placeholderText
|
||||
property string text
|
||||
property var onEditingFinished
|
||||
property alias textArea: textArea
|
||||
property alias textAreaText: textArea.text
|
||||
|
||||
height: 148
|
||||
color: "#1C1D21"
|
||||
|
@ -43,12 +44,6 @@ Rectangle {
|
|||
placeholderText: root.placeholderText
|
||||
text: root.text
|
||||
|
||||
onEditingFinished: {
|
||||
if (root.onEditingFinished && typeof root.onEditingFinished === "function") {
|
||||
root.onEditingFinished()
|
||||
}
|
||||
}
|
||||
|
||||
onCursorVisibleChanged: {
|
||||
if (textArea.cursorVisible) {
|
||||
fl.interactive = true
|
||||
|
|
|
@ -8,6 +8,8 @@ import "TextTypes"
|
|||
RadioButton {
|
||||
id: root
|
||||
|
||||
property int textMaximumLineCount: 2
|
||||
property int textElide: Qt.ElideRight
|
||||
property string descriptionText
|
||||
|
||||
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
|
||||
|
@ -104,6 +106,8 @@ RadioButton {
|
|||
|
||||
ListItemTitleType {
|
||||
text: root.text
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
|
||||
color: {
|
||||
if (root.checked) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue