View Issue Details

IDProjectCategoryView StatusLast Update
0031728LazarusWidgetsetpublic2021-06-16 21:11
ReporterCudaText man Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformgtk2 
Product Version1.9 (SVN) 
Summary0031728: Gtk2 Listview: report style, horizontal grid lines not painted
Description(Can make demo proj)
Repro in CudaText:
- open AddonManager Update dialog (listview, grid lines shown)
- select last item of listview (total 2 screen in LV)
- hold UP key until selected item0
==> horiz grid lines missed on top items

Picture
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files

Activities

CudaText man

2017-04-28 14:29

reporter  

listview-horz-.png (91,795 bytes)   
listview-horz-.png (91,795 bytes)   

Anton Kavalenka

2021-06-13 12:35

reporter   ~0131287

Plz provide simple demo.
It looks like intercepted painting calculates background rect
with +1 pixel error due to PANGO units to pixel conversion.
Bigger rect being filled just overwrite grid

CudaText man

2021-06-13 21:38

reporter   ~0131295

demo added. I have stable repro:

- press End to move selection on last item, scrollbar goes to end
- press many time Up key to move selection upper -> when you move to begin of list, you get bad painted grid.

Anton Kavalenka

2021-06-15 14:57

reporter   ~0131318

Last edited: 2021-06-15 14:57

View 2 revisions

I cant make any clues in GTK2<->LCL interaction in that issue.
The only possible for now workaround:
gtk2workaround.diff (606 bytes)   
Index: lcl/interfaces/gtk2/gtk2cellrenderer.pas
===================================================================
--- lcl/interfaces/gtk2/gtk2cellrenderer.pas	(revision 65235)
+++ lcl/interfaces/gtk2/gtk2cellrenderer.pas	(working copy)
@@ -135,7 +135,7 @@
   Msg.MeasureItemStruct := @MeasureItemStruct;
   DeliverMessage(AWinControl, Msg);
   width^ := gint(MeasureItemStruct.itemWidth);
-  height^ := gint(MeasureItemStruct.itemHeight);
+  height^ := 0;//gint(MeasureItemStruct.itemHeight);
 end;
 
 function GtkCellRendererStateToListViewDrawState(CellState: TGtkCellRendererState): TCustomDrawState;
gtk2workaround.diff (606 bytes)   

Juha Manninen

2021-06-16 21:11

developer   ~0131343

Not a good workaround. The cell height is only half of what it should be.

Issue History

Date Modified Username Field Change
2017-04-28 14:28 CudaText man New Issue
2017-04-28 14:29 CudaText man File Added: listview-horz-.png
2021-06-13 12:35 Anton Kavalenka Note Added: 0131287
2021-06-13 21:38 CudaText man Note Added: 0131295
2021-06-13 21:38 CudaText man File Added: Screenshot from 2021-06-14 00-36-23.png
2021-06-13 21:38 CudaText man File Added: tst-listview-bad-grid-lines.zip
2021-06-15 14:57 Anton Kavalenka Note Added: 0131318
2021-06-15 14:57 Anton Kavalenka File Added: gtk2workaround.diff
2021-06-15 14:57 Anton Kavalenka Note Edited: 0131318 View Revisions
2021-06-16 21:11 Juha Manninen Note Added: 0131343