mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 10:36:20 +02:00
Qt,Qt5,Qt6: checkbox offset should be applied only to the first column where checkbox resides. issue #41496
This commit is contained in:
parent
283bf2e564
commit
41593d7fba
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user