Qt,Qt5,Qt6: checkbox offset should be applied only to the first column where checkbox resides. issue #41496

This commit is contained in:
zeljan1 2025-03-01 18:04:56 +01:00
parent 283bf2e564
commit 41593d7fba
3 changed files with 3 additions and 3 deletions

View File

@ -1728,7 +1728,7 @@ begin
end;
ChkBoxRect := Rect(0, 0, 0, 0);
if QtTreeWidget.Checkable then
if QtTreeWidget.Checkable and (ASubItem = 0) then
begin
APixelMetric := QStyle_pixelMetric(QApplication_style(), QStylePM_IndicatorWidth, nil, QtTreeWidget.Widget);
APixelMetric += QStyle_pixelMetric(QApplication_style(), QStylePM_CheckBoxLabelSpacing, nil, QtTreeWidget.Widget);

View File

@ -1800,7 +1800,7 @@ begin
end;
ChkBoxRect := Rect(0, 0, 0, 0);
if QtTreeWidget.Checkable then
if QtTreeWidget.Checkable and (ASubItem = 0) then
begin
APixelMetric := QStyle_pixelMetric(QApplication_style(), QStylePM_IndicatorWidth, nil, QtTreeWidget.Widget);
APixelMetric += QStyle_pixelMetric(QApplication_style(), QStylePM_CheckBoxLabelSpacing, nil, QtTreeWidget.Widget);

View File

@ -1799,7 +1799,7 @@ begin
end;
ChkBoxRect := Rect(0, 0, 0, 0);
if QtTreeWidget.Checkable then
if QtTreeWidget.Checkable and (ASubItem = 0) then
begin
APixelMetric := QStyle_pixelMetric(QApplication_style(), QStylePM_IndicatorWidth, nil, QtTreeWidget.Widget);
APixelMetric += QStyle_pixelMetric(QApplication_style(), QStylePM_CheckBoxLabelSpacing, nil, QtTreeWidget.Widget);