Closed vincentparrett closed 1 year ago
Ok found a way to do it without creating separate components. I have it painting ok now (on w11 - stilll need to test on W10).
Question - anyone know why there are separate bitmaps for painting the title and the rows? They are both painted to the canvas each time anyway.. the titlebitmap seems to provide no benefit that I can see.
They look pretty good in PyScripter. But any improvements are welcome. The box can be made resizable, but no gripper is shown.
The code in TSynBaseCompletionProposalForm is very old and I has not changed substantially. So in relation to your question I am not sure.
The thick border looks ugly to me. I managed to get a nice thin border that is resizable.
Also investigating a bug where I eventually end up with a range check error.
I'll submit a PR in the next day or so once I'm done.
I have it painting nicely now, I was seeing flicker when scrolling the list before. The range check error I was seeing was my fault so not an issue.
I'm now looking at high dpi support.. the code is kindof a mess in this area I found that the proposal form is not scaling correctly - this may be a VCL bug as there are issues with dynamically created forms and the use of CreateNew. Also the way font scaling works is kinda funky. What isn't scaling at all is the ItemHeight - I will look at that today.
96dpi
140 dpi
Anyway, taken way longer than I expected to get this far but hope to have a PR ready for review soon.
Hmmm.. the 140 dpi image above looks blurry - but it's github doing that - it's not blurry in the screenshot I took or in the application!
I have moved this PR to https://github.com/pyscripter/SynEdit - where I'll be contributing from now on
TSynBaseCompletionProposalForm doesn't support vcl styles very well - and it looks pretty ugly (noting the comments in CreateParams about borders etc).
My thoughts are to try and make it look something like the visual studio one, with a gripper in the bottom right corner to solve the resizing issue (noting that the VS one can only be resized by the gripper).
I would probably need to create some small custom controls to make up the form rather than trying to do it all in the form class.
Thoughts?