Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick
- import QtQuick.Controls
- import QtQuick.Layouts
- import ThemeSwitcher
- import "../../../../../../qml/mobile/forms/lobby/home/gameslist"
- import "../../../../../../base_qml/common/components/effects"
- import "../../../../../../qml/mobile/forms/lobby/home/gameslist/GamesListScript.js" as GLS
- import "../../../../../../base_qml/common/scripts/PokerGlobalScript.js" as PGS
- Component {
- ItemDelegate {
- id: gamesListDelegate
- width: gamesListDelegate.GridView.view.cellWidth
- height: gamesListDelegate.GridView.view.cellHeight
- Rectangle {
- id: containerGamesListDelegate
- anchors.fill: parent
- color: ThemeSwitcher.currentTheme.colorStyles.gamesListBackgroundColor
- GamesListDelegateBackground {
- listElementName: name
- listElementBackgroundColor: GLS.getColorForBackground( name )
- anchors.fill: parent
- anchors.topMargin: 2
- anchors.leftMargin: !isLandscapeOrientation ? 8 : (index % 2) ? 2 : 8
- anchors.bottomMargin: 2
- anchors.rightMargin: !isLandscapeOrientation ? 8 : (index % 2) ? 8 : 2
- }
- ColumnLayout {
- spacing: 0
- anchors.left: parent.left
- anchors.leftMargin: 32
- anchors.verticalCenter: parent.verticalCenter
- Text {
- id: gamesListTextLabel
- property var textGradient: [ "#F9DF7B", "#B57E10", "#F9DF7B", "#C49328" ]
- text: PGS.qsNls( "common-string." + name, title )
- font: ThemeSwitcher.currentTheme.textStyles.gamesListTitleFont
- color: ThemeSwitcher.currentTheme.colorStyles.gamesListTitleColor
- }
- SELinearGradientEffect {
- id: jackpotTextGradient
- anchors.fill: gamesListTextLabel
- source: gamesListTextLabel
- gradient: Gradient {
- id: gradientContent
- orientation: Gradient.Vertical
- GradientStop { position: 0; color: gamesListTextLabel.textGradient[0] }
- GradientStop { position: 0.46; color: gamesListTextLabel.textGradient[1] }
- GradientStop { position: 0.51; color: gamesListTextLabel.textGradient[2] }
- GradientStop { position: 1; color: gamesListTextLabel.textGradient[3] }
- }
- }
- Repeater {
- model: info
- Item {
- Layout.margins: 0
- Layout.fillWidth: true
- Layout.minimumWidth: infoTitle.width + infoValue.width
- Layout.fillHeight: true
- Layout.minimumHeight: Math.max( infoTitle.height, infoValue.height )
- Text {
- id: infoTitle
- verticalAlignment: Text.AlignVCenter
- font: ThemeSwitcher.currentTheme.textStyles.gamesListIfnoTitleFont
- color: ThemeSwitcher.currentTheme.colorStyles.gamesListIfnoTitleColor
- text: "%1:".arg( PGS.qsNls( "common-string." + info.name, info.title ) )
- }
- Text {
- id: infoValue
- anchors.left: infoTitle.right
- verticalAlignment: Text.AlignVCenter
- font: ThemeSwitcher.currentTheme.textStyles.gamesListIfnoValueFont
- color: ThemeSwitcher.currentTheme.colorStyles.gamesListIfnoValueColor
- text: info.value
- }
- }
- }
- }
- }
- onClicked: {
- console.log( "**** Games List. Delegate Name: " + name + ", Index: " + index );
- gamesListDelegate.GridView.view.sendClickedDelegate( name )
- }
- }
- }
Add Comment
Please, Sign In to add comment