diff options
Diffstat (limited to 'src/quickcontrols/fusion/HorizontalHeaderView.qml')
-rw-r--r-- | src/quickcontrols/fusion/HorizontalHeaderView.qml | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/quickcontrols/fusion/HorizontalHeaderView.qml b/src/quickcontrols/fusion/HorizontalHeaderView.qml index dbea743aca..c9c03f322b 100644 --- a/src/quickcontrols/fusion/HorizontalHeaderView.qml +++ b/src/quickcontrols/fusion/HorizontalHeaderView.qml @@ -3,9 +3,7 @@ pragma ComponentBehavior: Bound -import QtQuick import QtQuick.Templates as T -import QtQuick.Controls.Fusion.impl T.HorizontalHeaderView { id: control @@ -18,36 +16,5 @@ T.HorizontalHeaderView { // TableView won't bother loading any delegates at all. implicitHeight: Math.max(1, contentHeight) - delegate: Rectangle { - id: delegate - - required property var model - - // Qt6: add cellPadding (and font etc) as public API in headerview - readonly property real cellPadding: 8 - - implicitWidth: text.implicitWidth + (cellPadding * 2) - implicitHeight: Math.max(control.height, text.implicitHeight + (cellPadding * 2)) - - gradient: Gradient { - id: buttonGradient - GradientStop { - position: 0 - color: Fusion.gradientStart(control.palette.button) - } - GradientStop { - position: 1 - color: Fusion.gradientStop(control.palette.button) - } - } - - Label { - id: text - text: delegate.model[control.textRole] - width: delegate.width - height: delegate.height - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - } + delegate: HorizontalHeaderViewDelegate { } } |