Remove native style customization warnings for ItemDelegate
It has no native visuals so customizing it is fine. Task-number: QTBUG-123773 Pick-to: 6.5 6.7 Change-Id: Iebac1231b096dbb5f9cde1d79ccda59688b25f09 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
a35950db95
commit
f5b235b95d
|
@ -24,7 +24,9 @@ T.CheckDelegate {
|
||||||
spacing: 6
|
spacing: 6
|
||||||
padding: 6
|
padding: 6
|
||||||
|
|
||||||
contentItem: NativeStyle.DefaultItemDelegateIconLabel {}
|
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
||||||
|
readonly property bool __ignoreNotCustomizable: true
|
||||||
|
}
|
||||||
|
|
||||||
indicator: NativeStyle.CheckDelegate {
|
indicator: NativeStyle.CheckDelegate {
|
||||||
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||||
|
|
|
@ -26,6 +26,8 @@ T.CheckDelegate {
|
||||||
|
|
||||||
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
||||||
color: control.highlighted ? control.palette.button : control.palette.windowText
|
color: control.highlighted ? control.palette.button : control.palette.windowText
|
||||||
|
|
||||||
|
readonly property bool __ignoreNotCustomizable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
indicator: NativeStyle.CheckDelegate {
|
indicator: NativeStyle.CheckDelegate {
|
||||||
|
|
|
@ -6,5 +6,7 @@ import QtQuick.NativeStyle as NativeStyle
|
||||||
NativeStyle.DefaultRadioDelegate {
|
NativeStyle.DefaultRadioDelegate {
|
||||||
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
||||||
color: control.highlighted ? control.palette.button : control.palette.windowText
|
color: control.highlighted ? control.palette.button : control.palette.windowText
|
||||||
|
|
||||||
|
readonly property bool __ignoreNotCustomizable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@ T.SwitchDelegate {
|
||||||
|
|
||||||
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
||||||
color: control.highlighted ? control.palette.button : control.palette.windowText
|
color: control.highlighted ? control.palette.button : control.palette.windowText
|
||||||
|
|
||||||
|
readonly property bool __ignoreNotCustomizable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
|
@ -9,8 +9,6 @@ import QtQuick.NativeStyle as NativeStyle
|
||||||
T.ItemDelegate {
|
T.ItemDelegate {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
readonly property bool __notCustomizable: true
|
|
||||||
|
|
||||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
implicitContentWidth + leftPadding + rightPadding)
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
|
@ -30,7 +28,5 @@ T.ItemDelegate {
|
||||||
implicitHeight: 20
|
implicitHeight: 20
|
||||||
color: Qt.darker(control.highlighted
|
color: Qt.darker(control.highlighted
|
||||||
? control.palette.highlight : control.palette.button, control.down ? 1.05 : 1)
|
? control.palette.highlight : control.palette.button, control.down ? 1.05 : 1)
|
||||||
|
|
||||||
readonly property bool __ignoreNotCustomizable: true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,4 @@ IconLabel {
|
||||||
rightPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
|
rightPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
|
||||||
|
|
||||||
readonly property T.ItemDelegate control: parent as T.ItemDelegate
|
readonly property T.ItemDelegate control: parent as T.ItemDelegate
|
||||||
readonly property bool __ignoreNotCustomizable: true
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,9 @@ T.RadioDelegate {
|
||||||
icon.width: 16
|
icon.width: 16
|
||||||
icon.height: 16
|
icon.height: 16
|
||||||
|
|
||||||
contentItem: NativeStyle.DefaultItemDelegateIconLabel {}
|
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
|
||||||
|
readonly property bool __ignoreNotCustomizable: true
|
||||||
|
}
|
||||||
|
|
||||||
indicator: NativeStyle.RadioDelegate {
|
indicator: NativeStyle.RadioDelegate {
|
||||||
x: control.text
|
x: control.text
|
||||||
|
|
|
@ -366,7 +366,7 @@ void tst_customization::override_data()
|
||||||
"macOS",
|
"macOS",
|
||||||
{
|
{
|
||||||
"Button", "CheckBox", "CheckDelegate", "ComboBox", "DelayButton", "Dial", "Frame",
|
"Button", "CheckBox", "CheckDelegate", "ComboBox", "DelayButton", "Dial", "Frame",
|
||||||
"GroupBox", "ItemDelegate", "ProgressBar", "RadioButton", "RadioDelegate", "SelectionRectangle",
|
"GroupBox", "ProgressBar", "RadioButton", "RadioDelegate", "SelectionRectangle",
|
||||||
"RangeSlider", "Slider", "SpinBox", "TextArea", "TextField", "TreeViewDelegate"
|
"RangeSlider", "Slider", "SpinBox", "TextArea", "TextField", "TreeViewDelegate"
|
||||||
// TODO: ScrollView, ScrollBar
|
// TODO: ScrollView, ScrollBar
|
||||||
}
|
}
|
||||||
|
@ -375,7 +375,7 @@ void tst_customization::override_data()
|
||||||
"Windows",
|
"Windows",
|
||||||
{
|
{
|
||||||
"Button", "CheckBox", "CheckDelegate", "ComboBox", "DelayButton", "Frame", "GroupBox",
|
"Button", "CheckBox", "CheckDelegate", "ComboBox", "DelayButton", "Frame", "GroupBox",
|
||||||
"ItemDelegate", "ProgressBar", "RadioButton", "RadioDelegate", "RangeSlider", "SelectionRectangle",
|
"ProgressBar", "RadioButton", "RadioDelegate", "RangeSlider", "SelectionRectangle",
|
||||||
"ScrollBar", "Slider", "SpinBox", "Switch", "SwitchDelegate", "TextArea", "TextField"
|
"ScrollBar", "Slider", "SpinBox", "Switch", "SwitchDelegate", "TextArea", "TextField"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue