mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-06 02:15:23 +08:00
update
This commit is contained in:
@ -312,6 +312,19 @@ Rectangle {
|
||||
id:com_handle
|
||||
Item {}
|
||||
}
|
||||
|
||||
Component{
|
||||
id:com_column_text
|
||||
FluText {
|
||||
id: column_text
|
||||
text: modelData
|
||||
anchors.fill: parent
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
TableView {
|
||||
id: header_horizontal
|
||||
model: TableModel{
|
||||
@ -330,9 +343,10 @@ Rectangle {
|
||||
id:column_item_control
|
||||
readonly property real cellPadding: 8
|
||||
property bool canceled: false
|
||||
property int columnIndex: column
|
||||
readonly property var obj : columnSource[column]
|
||||
implicitWidth: column_text.implicitWidth + (cellPadding * 2)
|
||||
implicitHeight: Math.max(36, column_text.implicitHeight + (cellPadding * 2))
|
||||
implicitWidth: item_column_loader.item.implicitWidth + (cellPadding * 2)
|
||||
implicitHeight: Math.max(36, item_column_loader.item.implicitHeight + (cellPadding * 2))
|
||||
color:{
|
||||
d.selectionFlag
|
||||
if(column_item_control_mouse.pressed){
|
||||
@ -341,18 +355,6 @@ Rectangle {
|
||||
return column_item_control_mouse.containsMouse&&!canceled ? control.hoverButtonColor : FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
}
|
||||
border.color: FluTheme.dark ? "#252525" : "#e4e4e4"
|
||||
FluText {
|
||||
id: column_text
|
||||
text: model.display
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
font.bold:{
|
||||
d.selectionFlag
|
||||
return true
|
||||
}
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
MouseArea{
|
||||
id:column_item_control_mouse
|
||||
anchors.fill: parent
|
||||
@ -372,6 +374,28 @@ Rectangle {
|
||||
d.selectionFlag = !d.selectionFlag
|
||||
}
|
||||
}
|
||||
Loader{
|
||||
id:item_column_loader
|
||||
property var itemModel: model
|
||||
property var modelData: model.display
|
||||
property var tableView: table_view
|
||||
property var tableModel: table_model
|
||||
property var options:{
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.options
|
||||
}
|
||||
return {}
|
||||
}
|
||||
property int column: column_item_control.columnIndex
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
sourceComponent: {
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.comId
|
||||
}
|
||||
return com_column_text
|
||||
}
|
||||
}
|
||||
MouseArea{
|
||||
property point clickPos: "0,0"
|
||||
height: parent.height
|
||||
|
Reference in New Issue
Block a user