Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactorings to simplify FireMonkey port #841

Open
joachimmarder opened this issue Nov 6, 2018 · 8 comments
Open

Refactorings to simplify FireMonkey port #841

joachimmarder opened this issue Nov 6, 2018 · 8 comments
Labels
Breaking Change In Development Refactoring Internal code changes that improve architecture

Comments

@joachimmarder
Copy link
Contributor

joachimmarder commented Nov 6, 2018

See pull request #839 for a detailed discussion. Proposed changes:

  • Since FMX uses the type single for coordinates and dimensions, while VCL uses Integer, we should create an lais to avoid having too many $ifdef in the code.
  • Some function use the type HDC, we should try to switch to TCanvas instead.
  • We should discuss to throw old and rarely used features overboard, like tiled background and own drawn alpha-blended selection
  • Get rid of UtilityImages / VirtualTrees.res, they are also not high-dpi compatible. Maybe draw them at runtime on bitmaps.
  • Extract TVTDataObject, VTDRagManager etc. to own unit.
@livius2
Copy link
Contributor

livius2 commented Nov 7, 2018

All looks ok but

We should discuss to throw old and rarely used features overboard, like tiled background and own drawn alpha-blended selection

but this one should stay. I use it myself.
I can migrate this to FMX but definitely later. The priority for drawing migration is drawing the header for me.

@livius2
Copy link
Contributor

livius2 commented Nov 7, 2018

I can change all to alias TDimension but two questions

  1. change also events?
  2. change also published properties? If not this is harder task - because some properties are in BaseTree as public but in descendant as published.

I see more problems here.
Overrided procedures can not have TDimension replacement...

@joachimmarder
Copy link
Contributor Author

Changing published properties should not be breaking, so yes. For the events we should consider waiting to the next major version of Virtual TreeView. It will work, but the IDE will show an (unnecessary) warning.

I wonder: Is Firemonkey making actual use of the decimal places that the Single type offers, or do you typically have whole number here too?

A V8.0 might be a good point to finally merge the branches and make such small breaking changes. There is another event that should be changed (#837).

@livius2
Copy link
Contributor

livius2 commented Nov 7, 2018

  • Since FMX uses the type single for coordinates and dimensions, while VCL uses Integer, we should create an lais to avoid having too many $ifdef in the code.
  • Some function use the type HDC, we should try to switch to TCanvas instead.

changes commited

I wonder: Is Firemonkey making actual use of the decimal places that the Single type offers, or do you typically have whole number here too?

It depend of usage case. Normally we have fraction=0 but you can have some scalling and any calculation can be made by fraction.

@joachimmarder
Copy link
Contributor Author

changes commited

Not sure how to get these changes and leave out all your other changes. I will apply them manually in master branch at a later time.

@livius2
Copy link
Contributor

livius2 commented Nov 7, 2018

I suppose you can cherry-pick this particular commit

@joachimmarder joachimmarder added Refactoring Internal code changes that improve architecture Breaking Change labels Nov 9, 2018
@livius2
Copy link
Contributor

livius2 commented Nov 9, 2018

Added support of header drawing - its columns and button styles
Still few pixel issues but near to compleated

@livius2
Copy link
Contributor

livius2 commented Nov 12, 2018

Added some click events, expand, collapse, header column resize, focus rect..
It looks now really promissing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change In Development Refactoring Internal code changes that improve architecture
Projects
None yet
Development

No branches or pull requests

2 participants