2023-05-19 07:45:21 +08:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
2023-12-06 21:07:35 +08:00
|
|
|
import Fk.RoomElement
|
2023-05-19 07:45:21 +08:00
|
|
|
|
|
|
|
Flickable {
|
|
|
|
id: root
|
|
|
|
anchors.fill: parent
|
|
|
|
property var extra_data: ({})
|
|
|
|
|
|
|
|
signal finish()
|
|
|
|
|
|
|
|
contentHeight: details.height
|
|
|
|
ScrollBar.vertical: ScrollBar {}
|
|
|
|
|
2023-12-06 21:07:35 +08:00
|
|
|
RowLayout {
|
2023-05-19 07:45:21 +08:00
|
|
|
id: details
|
|
|
|
width: parent.width - 40
|
|
|
|
x: 20
|
2023-12-06 21:07:35 +08:00
|
|
|
spacing: 20
|
2023-05-19 07:45:21 +08:00
|
|
|
|
2023-12-06 21:07:35 +08:00
|
|
|
CardItem {
|
|
|
|
id: cardPic
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
Layout.topMargin: 10
|
|
|
|
cid: 0
|
2023-05-19 07:45:21 +08:00
|
|
|
}
|
|
|
|
|
2023-12-06 21:07:35 +08:00
|
|
|
ColumnLayout {
|
|
|
|
Text {
|
|
|
|
id: screenName
|
|
|
|
Layout.fillWidth: true
|
|
|
|
font.pixelSize: 18
|
|
|
|
color: "#E4D5A0"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextEdit {
|
|
|
|
id: skillDesc
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
font.pixelSize: 18
|
|
|
|
color: "#E4D5A0"
|
|
|
|
|
|
|
|
readOnly: true
|
|
|
|
selectByKeyboard: true
|
|
|
|
selectByMouse: false
|
|
|
|
wrapMode: TextEdit.WordWrap
|
|
|
|
textFormat: TextEdit.RichText
|
|
|
|
}
|
2023-05-19 07:45:21 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onExtra_dataChanged: {
|
|
|
|
const card = extra_data.card;
|
|
|
|
if (!card) return;
|
2023-12-06 21:07:35 +08:00
|
|
|
cardPic.setData(card.toData());
|
2023-05-19 07:45:21 +08:00
|
|
|
const name = card.virt_name ? card.virt_name : card.name;
|
2024-01-25 03:23:29 +08:00
|
|
|
screenName.text = luatr(name);
|
|
|
|
skillDesc.text = luatr(":" + name);
|
2023-05-19 07:45:21 +08:00
|
|
|
}
|
|
|
|
}
|