I cannot recreate this problem on small test-application, maybe because in much, much larger project AC works somehow differently but, the situation is like that: I create SkinProvider and sTitlebar on runtime dynamically. I connect them both with SkinManager, and then I create titlebar buttons (different types for example bsMenu). Everything is working fine beside AutoSize property of titlebar button. AC always calculate size of my buttons even though AutoSize is set to False at all times. I manage to found source of the problem. It's a line in sSkinProvider.pas nr. 6812:
Code:
if Item.ContentSize.cx = 0 then Item.UpdateSize;
Somehow (even though I set width and height of the buttons <> 0) cx = 0 which forces UpdateSize function. I manage to fix the problem changing this line to:
Code:
if Item.ContentSize.cx = 0 then
begin
if Item.AutoSize then
Item.UpdateSize;
end;
It works perfectly ok right now, but I'm worried that I have to change this every time I upgrade AC Controls again. So please fix this problem or put my fix into your code. Thank you.