Warning, /rolisteam/rolisteam/src/libraries/qml_views/InstantMessaging/DiceMessageDelegate.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick
0002 import QtQuick.Controls
0003 import QtQuick.Layouts
0004 import Customization
0005 
0006 Frame {
0007     id: frame
0008     property QtObject message: model.message
0009     property QtObject styleSheet: Theme.styleSheet("InstantMessaging")
0010 
0011     padding: frame.styleSheet.padding+10
0012     Layout.minimumWidth: iconPart.implicitWidth + mainText.implicitWidth + details.implicitWidth + 2 * spacing + 50
0013     ColumnLayout {
0014         id: layout
0015         anchors.fill: parent
0016         property alias showDetails: details.checked
0017         Label {
0018             text: frame.message.comment
0019             visible: frame.message.comment
0020             Layout.fillWidth: true
0021         }
0022         RowLayout {
0023             Layout.fillWidth: true
0024             Layout.preferredHeight: Math.max(iconPart.implicitHeight,Math.max(frame.styleSheet.imageSize+2*spacing, mainText.height+2*spacing))
0025             Layout.maximumHeight: layout.showDetails ? Number.POSITIVE_INFINITY : Math.max(frame.styleSheet.imageSize+2*spacing, mainText.height+2*spacing)
0026 
0027             AvatarPanel {
0028                 id: iconPart
0029                 source:"image://avatar/%1".arg(model.writerId)
0030                 text: "%1 - %2".arg(model.time).arg(model.writerName)
0031             }
0032 
0033             Label {
0034                 id: mainText
0035                 text: frame.message.result
0036                 font: Theme.imBigFont
0037                 //font.bold: true
0038                 Layout.fillWidth: true
0039                 textFormat: Label.RichText
0040                 antialiasing: false
0041                 minimumPixelSize: 10;
0042                 //font.pixelSize: frame.styleSheet.imageSize*frame.factor
0043                 horizontalAlignment: Text.AlignHCenter
0044                 wrapMode: Label.WordWrap
0045                 ToolTip.visible: activeFocus
0046                 ToolTip.text: frame.message.result
0047             }
0048 
0049             ToolButton {
0050                 id: details
0051                 Layout.rightMargin: frame.styleSheet.rightMarge
0052 
0053                 background: Image {
0054                     source: "qrc:/resources/rolistheme/up_arrow.svg"
0055                     sourceSize.height: frame.styleSheet.detailImageSize
0056                     sourceSize.width: frame.styleSheet.detailImageSize
0057                 }
0058 
0059 
0060                 checkable: true
0061                 ToolTip.text: qsTr("Details")
0062                 rotation: checked ? 0 : 180
0063                 flat: true
0064 
0065             }
0066         }
0067         Label {
0068             text: qsTr("Details: %1").arg(frame.message.details)
0069             textFormat: Label.RichText
0070             visible: layout.showDetails
0071         }
0072         Label {
0073             text: qsTr("Command: %1").arg(frame.message.command)
0074             visible: layout.showDetails
0075         }
0076     }
0077 
0078     background: Rectangle {
0079         border.width: 1
0080         border.color: "black"
0081         color: "lightblue"
0082         radius: 10
0083         opacity: 0.5
0084 
0085         Image {
0086             source: "qrc:/resources/rolistheme/1000-symbole.png"
0087             anchors.fill: parent
0088             sourceSize.width: layout.implicitWidth
0089             sourceSize.height: layout.implicitHeight
0090             opacity: 0.4
0091             fillMode: Image.PreserveAspectFit
0092         }
0093     }
0094 }