The beginning (or it will be useful) of the question above, by reference, is nothing remarkable. The theme is:
D 10.1 starter. Standard application. The options included design schemes. Now determine whether the design is applied or not - we take from there, the same functions.
Again (when choosing other themes in the project options), I choose the default style - Windows. Those. others are present until they are selected programmatically, but there is a default style - Windows.
Everything is working fine. For all styles. In addition to the default - Windows. When choosing it (in any case, I’m wrinkling) -............. or rather not so, when developing the default in this style everything is ok. And as soon as I use any other - there is a small joint in the right side of the application - it is about 5-10 pixels always smaller (and if you start with a new layout, the right side of all forms is usually smaller than the original) .
I fight like this (crutches)
Procedure GuNewRForm; GuAddRighForm=8; // экспериментально методом тыка Var i:integer; begin if not GuIsAppThemed then exit; for i:=0 to application.ComponentCount-1 do if (application.Components[i] is TForm) then With TForm(application.Components[i]) Do width:=width+GuAddRightForm; end; Function GuIsAppThemed:boolean; begin if (TStyleManager.Enabled)and(TStyleManager.IsCustomStyleActive) then result:=true else result:=false; end; Function GuGetRForm:integer; begin if GuIsAppThemed then result:=GuAddRightForm else result:=0; end; and in the project file before application.run; add GuNewRForm; {from a separate module, cat. in uses 1st}
Questions:
- Why there is a difference in the right fields !? (I previously read about DPI, scaled form, etc., but not the same!)
- How to deal with it?
- How to calculate the difference between [win.view.formwith] & [themed.view.formwith]? so far only by sight.
Maybe it's easier way and I complicate things?
++ If it is not clearly written, I will provide the code and a more detailed description