Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Jan 20, 2024
1 parent 5b7bd8a commit 53d2844
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/Qt5/imports/FluentUI/Controls/FluTableView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Rectangle {
property var dataSource
property color borderColor: FluTheme.dark ? "#252525" : "#e4e4e4"
property alias tableModel: table_model
property bool horizonalHeaderVisible: true
property bool verticalHeaderVisible: true
id:control
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
onColumnSourceChanged: {
Expand Down Expand Up @@ -380,8 +382,9 @@ Rectangle {
syncDirection: Qt.Horizontal
anchors.left: scroll_table.left
anchors.top: parent.top
visible: control.horizonalHeaderVisible
implicitWidth: syncView ? syncView.width : 0
implicitHeight: Math.max(1, contentHeight)
implicitHeight: visible ? Math.max(1, contentHeight) : 0
syncView: table_view
boundsBehavior: Flickable.StopAtBounds
clip: true
Expand Down Expand Up @@ -517,7 +520,8 @@ Rectangle {
boundsBehavior: Flickable.StopAtBounds
anchors.top: scroll_table.top
anchors.left: parent.left
implicitWidth: Math.max(1, contentWidth)
visible: control.verticalHeaderVisible
implicitWidth: visible ? Math.max(1, contentWidth) : 0
implicitHeight: syncView ? syncView.height : 0
syncDirection: Qt.Vertical
syncView: table_view
Expand Down
8 changes: 6 additions & 2 deletions src/Qt6/imports/FluentUI/Controls/FluTableView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Rectangle {
property var dataSource
property color borderColor: FluTheme.dark ? "#252525" : "#e4e4e4"
property alias tableModel: table_model
property bool horizonalHeaderVisible: true
property bool verticalHeaderVisible: true
id:control
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
onColumnSourceChanged: {
Expand Down Expand Up @@ -381,8 +383,9 @@ Rectangle {
syncDirection: Qt.Horizontal
anchors.left: scroll_table.left
anchors.top: parent.top
visible: control.horizonalHeaderVisible
implicitWidth: syncView ? syncView.width : 0
implicitHeight: Math.max(1, contentHeight)
implicitHeight: visible ? Math.max(1, contentHeight) : 0
syncView: table_view
boundsBehavior: Flickable.StopAtBounds
clip: true
Expand Down Expand Up @@ -518,7 +521,8 @@ Rectangle {
boundsBehavior: Flickable.StopAtBounds
anchors.top: scroll_table.top
anchors.left: parent.left
implicitWidth: Math.max(1, contentWidth)
visible: control.verticalHeaderVisible
implicitWidth: visible ? Math.max(1, contentWidth) : 0
implicitHeight: syncView ? syncView.height : 0
syncDirection: Qt.Vertical
syncView: table_view
Expand Down

0 comments on commit 53d2844

Please sign in to comment.