Comments (2)
Thanks, issue 1 and 2 are addressed.
Incidentally it is also worth moving UpdateHeaderRect() after the inherited call
Agreed.
Instead of using CurrentPPI it is faster ....
I don't think we should do preemptive performance optimization here.
and more reliable to use FCurrentPPI
Can you explain why? Given general best practices, one should use the property, not the member variable.
from virtual-treeview.
@joachimmarder
Thanks for the changes!
I don't think we should do preemptive performance optimization here.
It is not about optimization. As explained in #1205 FCurrentPPI is a protected field and CurrentPPI is a property that gets the PPI from the control handle. The former is more reliable and consistent with the current control scaling state. So, if you can (meaning if FCurrentPPI has been updated by the inherited ChangeScale), you should use FCurrentPPI instead of CurrentPPI.
On Issue 2:
You can significantly simplify the code by not checking IsSystemStyle and just using StyleServices.GetElementSize, Please see above.
In other words the following:
if StyleServices.IsSystemStyle then
begin
{$if CompilerVersion >= 33}
if TOSVersion.Check(10) and (TOSVersion.Build >= 15063) then
Theme := OpenThemeDataForDPI(Handle, 'BUTTON', CurrentPPI)
else
{$ifend}
Theme := OpenThemeData(Self.Handle, 'BUTTON');
Details := StyleServices.GetElementDetails(tbCheckBoxUncheckedNormal);
Res := GetThemePartSize(Theme, BM.Canvas.Handle, Details.Part, Details.State, nil, TS_TRUE, lSize) = S_OK;
end
else
can just be removed!
from virtual-treeview.
Related Issues (20)
- Fixed column MinWidthPercent leads to inifinite loop
- 8.0.1 compile error HOT 3
- Is 7.6.6 an alias of 8.0? HOT 2
- Can't Install VirtualTreesD280.bpl HOT 1
- TVirtualStringTree do not publish `NodeDataSize` HOT 2
- IDataObject replaced by TVTDragDataObject? HOT 4
- Sort indicators above header caption.
- Header DblClickResize and HeaderClickAutoSort HOT 3
- DefaultNodeHeight not working anymore HOT 3
- Threads in VST HOT 5
- DefaultNodeHeight has no effect since 8.0.2 HOT 2
- Reordered Grid of columns htrows exception when moving left with the keyboard HOT 2
- Fixed columns are broken in V7.6.6 and V8.0.2 HOT 3
- As of the September 22, 2023 release, the C++Builder version is not compatible with the previous version HOT 2
- Method `TVirtualTreeColumn.GetCaptionWidth` handles owner-drawn caption badly HOT 5
- Incompatible error when calling VTAccessibilityFactory.GetAccessibilityFactory.CreateIAccessible(Self); HOT 4
- VirtualTreeView DefaultNodeHeight dont work HOT 1
- Access violation on changing option of multiselected column header HOT 1
- Distorted shape when dragging the columns HOT 1
- double-click clears selected checkboxes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtual-treeview.