View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0034627 | Lazarus | LCL | public | 2018-12-01 15:36 | 2018-12-02 10:13 |
Reporter | Ondrej Pokorny | Assigned To | Zeljan Rikalo | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Summary | 0034627: Wrong treeview tooltip hint position after #34461 / r34461 | ||||
Description | After 0034461 / r34461 the hint position is wrong in the treeview - it is shifted 1px to the right. | ||||
Steps To Reproduce | See the attached project. Place mouse cursor above the treeview item. The hint window is shifted 1px to the right. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
related to | 0034461 | closed | Zeljan Rikalo | Patches | TreeItem text is centered instead of left justified |
|
|
|
It is regression after r59647 |
|
Yes, it is a regression after r59647 - sorry, I got the revision number wrong in the description. It should read r59647. |
|
issue34627.diff (819 bytes)
Index: lcl/include/treeview.inc =================================================================== --- lcl/include/treeview.inc (revision 59709) +++ lcl/include/treeview.inc (working copy) @@ -1747,7 +1747,7 @@ Result := DisplayTextLeft; TV := TreeView; if TV <> nil then - Inc(Result, TV.Canvas.TextWidth(Text) + TV.Indent div 2); + Inc(Result, TV.Canvas.TextWidth(Text) + (TV.FDefItemSpace * 2){TV.Indent div 2}); end; function TTreeNode.AlphaSort: Boolean; @@ -5237,7 +5237,8 @@ Canvas.Font.Color := FHotTrackColor; end; - NodeRect.Offset(ScaleX(2, 96), 0); + OffsetRect(NodeRect, FDefItemSpace, 0); + if (tvoThemedDraw in Options) then ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX, 0) else |
|
Please test with attached patch. I cannot test on real windows machine, but under linux and wine it looks correct now. |
|
Thank you. It didn't help on Windows at 96PPI. I'll test on different PPI settings and Linux in the next days. |
|
Wait, you're talking about Hint window position, not about position of text inside hint window ? |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-12-01 15:36 | Ondrej Pokorny | New Issue | |
2018-12-01 15:36 | Ondrej Pokorny | File Added: TreeViewToolTip.zip | |
2018-12-01 17:32 | Zeljan Rikalo | Note Added: 0112300 | |
2018-12-01 17:36 | Ondrej Pokorny | Note Added: 0112303 | |
2018-12-01 17:52 | Zeljan Rikalo | Relationship added | related to 0034461 |
2018-12-01 18:12 | Zeljan Rikalo | File Added: issue34627.diff | |
2018-12-01 18:12 | Zeljan Rikalo | LazTarget | => - |
2018-12-01 18:12 | Zeljan Rikalo | Note Added: 0112306 | |
2018-12-01 18:12 | Zeljan Rikalo | Assigned To | => Zeljan Rikalo |
2018-12-01 18:12 | Zeljan Rikalo | Status | new => feedback |
2018-12-01 20:34 | Ondrej Pokorny | Note Added: 0112309 | |
2018-12-01 20:34 | Ondrej Pokorny | Status | feedback => assigned |
2018-12-02 10:13 | Zeljan Rikalo | Note Added: 0112312 |