- This topic has 6 replies, 2 voices, and was last updated 8 years, 10 months ago by
Support.
-
AuthorPosts
-
May 30, 2016 at 2:58 pm #55071
Support
KeymasterI can make a function for colors converting, like the ColorToRGB function.
Something named like ColorToSkin(AColor: TColor)… Is this what you meant?
May 30, 2016 at 3:54 pm #55073HeDiBo
Participant'Support' wrote:I can make a function for colors converting, like the ColorToRGB function.
Something named like ColorToSkin(AColor: TColor)… Is this what you meant?
Wouldn't that be a much too complicated function? Do you really know how to convert clRed and clMoneyGreen to a color according to the skin?
I would be glad to have a conversion for the standard colors of a themed Windows app. Like clBtnShadow and clInactiveCaptionText. If you mean you can provide a conversion for these kind of colors, that would be great.
June 1, 2016 at 7:39 am #55086Support
Keymaster'HeDiBo' wrote:Do you really know how to convert clRed and clMoneyGreen to a color according to the skin?Such colors may be leaved unchanged.
Quote:I would be glad to have a conversion for the standard colors of a themed Windows app. Like clBtnShadow and clInactiveCaptionText. If you mean you can provide a conversion for these kind of colors, that would be great.function ColorToSkin(AColor: TColor): TColor;
I think, this function can do that for AlphaSkins, but I don't know how to do it for Windows theme.
June 1, 2016 at 6:46 pm #55100HeDiBo
ParticipantThat would be very easy:
Code:function ColorToSkin(AColor: TColor): TColor;
begin
if not skinned then Result := AColor
else begin
// Here you would do your stuff
end{if};
end;So I would call the function like this: ColorToSkin(clBtnShadow) and it would return clBtnShadow if not skinning or your equivalent, theme oriented color if skinning was active.
June 11, 2016 at 11:28 am #55165HeDiBo
ParticipantIn 10.30 the function SysColorToSkin is almost what you would expect.
Only, if the skinmanager used is not active, the color is still translated. That's not the way it should work.
You see, if you want to write a program that will work OK with or without skinning, the function SysColorToSkin(clBtnShadow) should return the value clBtnShadow if the skinmanager is not active.
I think, the code for SysColorToSkin should be this:
Code:if ASkinManager = nil then
ASkinManager := DefaultManager;if ( ASkinManager nil ) and
( ASkinManager.Active ) then // Added by DB
case AColor of
clScrollBar, clBackground, clBtnFace, clAppWorkSpace, clMenu:
.
.June 13, 2016 at 10:55 am #55171Support
KeymasterYou are right, such code will be added.
-
AuthorPosts
- You must be logged in to reply to this topic.