Exclude IntroPanel from WelcomeSettingsView
Additionally: - word wrapping problems fixed - storybook page added
This commit is contained in:
parent
456a21f831
commit
617866a0a4
|
@ -365,6 +365,10 @@ ListModel {
|
|||
title: "ProfileSocialLinksPanel"
|
||||
section: "Panels"
|
||||
}
|
||||
ListElement {
|
||||
title: "IntroPanel"
|
||||
section: "Panels"
|
||||
}
|
||||
ListElement {
|
||||
title: "PopupSizing"
|
||||
section: "Research / Examples"
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import Models 1.0
|
||||
import Storybook 1.0
|
||||
import utils 1.0
|
||||
|
||||
import AppLayouts.Communities.panels 1.0
|
||||
|
||||
SplitView {
|
||||
id: root
|
||||
|
||||
orientation: Qt.Vertical
|
||||
|
||||
Item {
|
||||
id: container
|
||||
|
||||
SplitView.fillWidth: true
|
||||
SplitView.fillHeight: true
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: tokenPanel
|
||||
border.width: 1
|
||||
anchors.margins: -15
|
||||
}
|
||||
|
||||
IntroPanel {
|
||||
id: tokenPanel
|
||||
|
||||
width: 600
|
||||
anchors.centerIn: parent
|
||||
|
||||
image: Style.png("community/airdrops8_1")
|
||||
|
||||
title: radioButtonsGroup.text
|
||||
subtitle: radioButtonsGroup.text
|
||||
|
||||
checkersModel: [
|
||||
radioButtonsGroup.text,
|
||||
radioButtonsGroup.text,
|
||||
radioButtonsGroup.text
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
LogsAndControlsPanel {
|
||||
SplitView.minimumHeight: 100
|
||||
SplitView.preferredHeight: 100
|
||||
|
||||
SplitView.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
ButtonGroup {
|
||||
id: radioButtonsGroup
|
||||
|
||||
buttons: radioButtonsRow.children
|
||||
|
||||
readonly property string text: checkedButton.textContent
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: radioButtonsRow
|
||||
|
||||
RadioButton {
|
||||
id: addRadioButton
|
||||
|
||||
readonly property string textContent:
|
||||
ModelsData.descriptions._short_
|
||||
|
||||
text: "Short text"
|
||||
checked: true
|
||||
}
|
||||
RadioButton {
|
||||
id: updateRadioButton
|
||||
|
||||
readonly property string textContent:
|
||||
ModelsData.descriptions.medium
|
||||
|
||||
text: "Long text"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
Control {
|
||||
id: root
|
||||
|
||||
property alias image: imageItem.source
|
||||
property alias title: titleItem.text
|
||||
property alias subtitle: subtitleItem.text
|
||||
property alias checkersModel: checkersItems.model
|
||||
|
||||
readonly property int imageWidth: 256
|
||||
readonly property int imageHeigth: root.imageWidth
|
||||
|
||||
padding : Style.current.padding
|
||||
bottomPadding: Style.current.xlPadding
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
readonly property int rowChildSpacing: 10
|
||||
readonly property color rowIconColor: Theme.palette.primaryColor1
|
||||
readonly property string rowIconName: "checkmark-circle"
|
||||
readonly property int rowFontSize: 15
|
||||
readonly property color rowTextColor: Theme.palette.directColor1
|
||||
readonly property double rowTextLineHeight: 1.2
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
radius: 16
|
||||
border.color: Theme.palette.baseColor5
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
Image {
|
||||
id: imageItem
|
||||
|
||||
objectName: "welcomeSettingsImage"
|
||||
Layout.preferredWidth: root.imageWidth
|
||||
Layout.preferredHeight: root.imageHeigth
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: titleItem
|
||||
|
||||
objectName: "welcomeSettingsTitle"
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 17
|
||||
font.weight: Font.Bold
|
||||
color: Theme.palette.directColor1
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: subtitleItem
|
||||
objectName: "welcomeSettingsSubtitle"
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
lineHeight: 1.2
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.baseColor1
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: checkersColumn
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
spacing: 10
|
||||
|
||||
Repeater {
|
||||
id: checkersItems
|
||||
|
||||
objectName: "checkListItem"
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
spacing: d.rowChildSpacing
|
||||
|
||||
StatusIcon {
|
||||
icon: d.rowIconName
|
||||
color: d.rowIconColor
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
objectName: "checkListText_" + index
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
text: modelData
|
||||
lineHeight: d.rowTextLineHeight
|
||||
font.pixelSize: d.rowFontSize
|
||||
color: d.rowTextColor
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ ColorPanel 1.0 ColorPanel.qml
|
|||
ColumnHeaderPanel 1.0 ColumnHeaderPanel.qml
|
||||
FeesPanel 1.0 FeesPanel.qml
|
||||
HidePermissionPanel 1.0 HidePermissionPanel.qml
|
||||
IntroPanel 1.0 IntroPanel.qml
|
||||
JoinCommunityCenterPanel 1.0 JoinCommunityCenterPanel.qml
|
||||
JoinCommunityHeaderPanel 1.0 JoinCommunityHeaderPanel.qml
|
||||
JoinPermissionsOverlayPanel 1.0 JoinPermissionsOverlayPanel.qml
|
||||
|
@ -17,9 +18,9 @@ OverviewSettingsPanel 1.0 OverviewSettingsPanel.qml
|
|||
PermissionConflictWarningPanel 1.0 PermissionConflictWarningPanel.qml
|
||||
PermissionQualificationPanel 1.0 PermissionQualificationPanel.qml
|
||||
PermissionsSettingsPanel 1.0 PermissionsSettingsPanel.qml
|
||||
ProfilePopupOverviewPanel 1.0 ProfilePopupOverviewPanel.qml
|
||||
ProfilePopupInviteFriendsPanel 1.0 ProfilePopupInviteFriendsPanel.qml
|
||||
ProfilePopupInviteMessagePanel 1.0 ProfilePopupInviteMessagePanel.qml
|
||||
ProfilePopupOverviewPanel 1.0 ProfilePopupOverviewPanel.qml
|
||||
SortableTokenHoldersList 1.0 SortableTokenHoldersList.qml
|
||||
SortableTokenHoldersPanel 1.0 SortableTokenHoldersPanel.qml
|
||||
TagsPanel 1.0 TagsPanel.qml
|
||||
|
|
|
@ -1,124 +1,24 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
import AppLayouts.Communities.panels 1.0
|
||||
|
||||
StatusScrollView {
|
||||
id: root
|
||||
|
||||
property int viewWidth: 560 // by design
|
||||
property alias image: imageItem.source
|
||||
property alias title: titleItem.text
|
||||
property alias subtitle: subtitleItem.text
|
||||
property alias checkersModel: checkersItems.model
|
||||
|
||||
property int imageWidth: 256
|
||||
property int imageHeigth: root.imageWidth
|
||||
|
||||
property alias image: introPanel.image
|
||||
property alias title: introPanel.title
|
||||
property alias subtitle: introPanel.subtitle
|
||||
property alias checkersModel: introPanel.checkersModel
|
||||
|
||||
padding: 0
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
IntroPanel {
|
||||
id: introPanel
|
||||
|
||||
width: root.viewWidth
|
||||
spacing: 24
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: contentColumn.implicitHeight + contentColumn.anchors.topMargin + contentColumn.anchors.bottomMargin
|
||||
color: "transparent"
|
||||
radius: 16
|
||||
border.color: Theme.palette.baseColor5
|
||||
clip: true
|
||||
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: 16
|
||||
anchors.bottomMargin: 32
|
||||
spacing: 8
|
||||
clip: true
|
||||
|
||||
Image {
|
||||
id: imageItem
|
||||
|
||||
objectName: "welcomeSettingsImage"
|
||||
Layout.preferredWidth: root.imageWidth
|
||||
Layout.preferredHeight: root.imageHeigth
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: titleItem
|
||||
|
||||
objectName: "welcomeSettingsTitle"
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 17
|
||||
font.weight: Font.Bold
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: subtitleItem
|
||||
objectName: "welcomeSettingsSubtitle"
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
lineHeight: 1.2
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.baseColor1
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: checkersColumn
|
||||
|
||||
readonly property int rowChildSpacing: 10
|
||||
readonly property color rowIconColor: Theme.palette.primaryColor1
|
||||
readonly property string rowIconName: "checkmark-circle"
|
||||
readonly property int rowFontSize: 15
|
||||
readonly property color rowTextColor: Theme.palette.directColor1
|
||||
readonly property double rowTextLineHeight: 1.2
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.topMargin: 8
|
||||
spacing: 10
|
||||
|
||||
Repeater {
|
||||
id: checkersItems
|
||||
|
||||
objectName: "checkListItem"
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: checkersColumn.rowChildSpacing
|
||||
|
||||
StatusIcon {
|
||||
icon: checkersColumn.rowIconName
|
||||
color: checkersColumn.rowIconColor
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
objectName: "checkListText_" + index
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: modelData
|
||||
lineHeight: checkersColumn.rowTextLineHeight
|
||||
font.pixelSize: checkersColumn.rowFontSize
|
||||
color: checkersColumn.rowTextColor
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue