Advertisement
Dmitriiiiiqiq

Label_Image

Oct 21st, 2021
2,345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 6.84 KB | None | 0 0
  1. import QtQuick 2.15
  2. import QtQuick.Layouts 1.3
  3. import QtGraphicalEffects 1.0
  4. import QtQuick.Controls 2.15
  5. import "../../../../../../qml/common/components"
  6. import "../../../../../../qml/mobile/forms/lobby/home/jackpot"
  7.  
  8. Item {
  9.     id: backgroundJackpot
  10.  
  11.     property Gradient jackpotBorderGradient: jackpotBorderGradient
  12.  
  13.     property real backgroundRadius: 3
  14.     property string listElementName: "cashtables"
  15.     property color jackpotBackgroundColor: "red"
  16.  
  17.     implicitWidth: parent.width
  18.     implicitHeight: 60
  19.  
  20.     ListModel {
  21.         id: jackpotBackgroundModel
  22.  
  23.         ListElement {
  24.             sourceIcon: "../../../../../../qml/mobile/forms/lobby/home/jackpot/image/monteCarlo/pict.png"
  25.             colorOne:"#151515"
  26.             colorTwo:"#001F18"
  27.             colorThree:"#11542C"
  28.             colorFor:"#001F18"
  29.             colorFive: "#001F18"
  30.         }
  31.         ListElement {
  32.             sourceIcon: "../../../../../../qml/mobile/forms/lobby/home/jackpot/image/badBeat/pict.png"
  33.             colorOne: "#151515"
  34.             colorTwo: "#08171E"
  35.             colorThree: "#005B78"
  36.             colorFor: "#08171E"
  37.             colorFive: "#08171E"
  38.         }
  39.         ListElement {
  40.             sourceIcon: "../../../../../../qml/mobile/forms/lobby/home/jackpot/image/smartBadBeat/pict.png"
  41.             colorOne: "#151515"
  42.             colorTwo: "#1F0000"
  43.             colorThree: "#7C2306"
  44.             colorFor: "#270000"
  45.             colorFive: "#270000"
  46.         }
  47.         ListElement {
  48.             sourceIcon: "../../../../../../qml/mobile/forms/lobby/home/jackpot/image/monteCarlo2/pict.png"
  49.             colorOne: "#151515"
  50.             colorTwo: "#00141F"
  51.             colorThree: "#2F4376"
  52.             colorFor: "#78172E"
  53.             colorFive: "#250F17"
  54.         }
  55.     }
  56.  
  57.     Rectangle {
  58.         id: backgroundShadow
  59.  
  60.         anchors.fill: parent
  61.  
  62.         layer.enabled: true
  63.         layer.effect: RectangularGlow {
  64.             anchors.fill: parent
  65.             glowRadius: 8
  66.             color: Qt.rgba(0, 0, 0, 0.5)
  67.         }
  68.     }
  69.  
  70.     SwipeView {
  71.         id: backgroundJackpotSwipe
  72.  
  73.         currentIndex: homeJackpotForm.indexWindow
  74.         anchors.fill: parent
  75.         Layout.fillWidth: true
  76.  
  77.         ParallelAnimation {
  78.  
  79.             OpacityAnimator {
  80.  
  81.                 target: backgroundJackpotSwipe
  82.                 from: 0.7;
  83.                 to: 1;
  84.                 duration: 200
  85.             }
  86.  
  87.             ScaleAnimator {
  88.                 target: backgroundJackpotSwipe
  89.                 from: 1.5;
  90.                 to: 1;
  91.                 duration: 200
  92.             }
  93.             running: homeJackpotForm.indexWindow
  94.         }
  95.  
  96.         Repeater {
  97.             id: repeaterSwipeViewContent
  98.  
  99.             model: jackpotBackgroundModel
  100.  
  101.             Item {
  102.                 id: jackpotBackgroundComponent
  103.  
  104.                 Rectangle {
  105.                     id: jackpotBackground
  106.  
  107.                     width: parent.width
  108.                     height: 52
  109.                     anchors.right: parent.right
  110.                     anchors.left: parent.left
  111.  
  112.                     anchors.rightMargin: 8
  113.                     anchors.leftMargin: 8
  114.  
  115.                     anchors.verticalCenter: parent.verticalCenter
  116.  
  117.                     radius: backgroundRadius
  118.  
  119.                     color: "gray"
  120.  
  121.                     border.width: 2
  122.                     border.color: "red"
  123.  
  124. //                    Loader {
  125. //                        id: jackpotLoaderBorderGradient
  126.  
  127. //                        anchors.fill: parent
  128. //                        active: jackpotBorderGradient
  129. //                        sourceComponent: border
  130. //                    }
  131.  
  132.                     Component.onCompleted: console.log( "Loader active: " + jackpotLoaderBorderGradient.active )
  133.  
  134. //                    Gradient {
  135. //                        id: jackpotBorderGradient
  136.  
  137. //                        GradientStop{ position: 0.2; color: "#292D34" }
  138. //                        GradientStop{ position: 0.4; color: "#26272C" }
  139. //                        GradientStop{ position: 0.6; color: "#3F434B" }
  140. //                        GradientStop{ position: 0.8; color: "#A19B75" }
  141. //                        GradientStop{ position: 1.0; color: "#3B3E47" }
  142. //                        GradientStop{ position: 1.0; color: "#25282F" }
  143. //                    }
  144.  
  145. //                    Component {
  146. //                        id: border
  147.  
  148. //                        Item {
  149.  
  150. //                            Rectangle {
  151. //                                id: borderFill
  152.  
  153. //                                anchors.fill: parent
  154. //                                radius: backgroundRadius
  155. //                                gradient: backgroundJackpot.jackpotBorderGradient
  156. //                                visible: true
  157. //                            }
  158.  
  159. //                            Rectangle {
  160. //                                id: backgroundBorder
  161.  
  162. //                                anchors.fill: parent
  163. //                                radius: backgroundRadius
  164. //                                border.width: 1
  165. //                                color: "red"
  166. //                                visible: true
  167. //                            }
  168.  
  169. //                            OpacityMask {
  170. //                                id: opM
  171.  
  172. //                                anchors.fill: parent
  173. //                                source: borderFill
  174. //                                maskSource: backgroundBorder
  175. //                            }
  176. //                        }
  177. //                    }
  178.                 }
  179.  
  180.                 LinearGradient {
  181.                     id: jackpotBackgroundLinearGradient
  182.  
  183.                     anchors.fill: jackpotBackground
  184.                     source: jackpotBackground
  185.  
  186.                     gradient: Gradient {
  187.  
  188.                         orientation: Gradient.Horizontal
  189.                         GradientStop{ position: 0.2; color: model.colorOne }
  190.                         GradientStop{ position: 0.4; color: model.colorTwo }
  191.                         GradientStop{ position: 0.6; color: model.colorThree }
  192.                         GradientStop{ position: 0.8; color: model.colorFor }
  193.                         GradientStop{ position: 1.0; color: model.colorFor }
  194.                     }
  195.                 }
  196.  
  197.                 Image {
  198.                     id: jackpotIcon
  199.  
  200.                     width: 100
  201.                     height: 60
  202.  
  203.                     anchors.verticalCenter: parent.verticalCenter
  204.                     anchors.left: parent.left
  205.                     anchors.leftMargin: 11
  206.  
  207.                     source: model.sourceIcon
  208.  
  209.                 }
  210.             }
  211.         }
  212.     }
  213.  
  214.     MouseArea {
  215.  
  216.         anchors.fill: parent
  217.         onClicked: {
  218.             console.log("Pressed Label")
  219.             timerFlippingContentJackpot.restart();
  220.         }
  221.     }
  222. }
  223.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement