- This topic has 6 replies, 2 voices, and was last updated 8 years, 5 months ago by Support.
-
AuthorPosts
-
May 27, 2016 at 10:43 am #36980HeDiBoParticipant
When an application must be able to run with skinning active or skinning disabled the standard colors (clScrollBar, clBackground, clActiveCaption, clInactiveCaption, clMenu, clWindow, clWindowFrame, clMenuText, clWindowText, clCaptionText, clActiveBorder, clInactiveBorder, clAppWorkSpace, clHighlight, clHighlightText, clBtnFace, clBtnShadow, clGrayText, clBtnText, clInactiveCaptionText, clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText, clInfoBk, clHotLight, clGradientActiveCaption, clGradientInactiveCaption, clMenuHighlight, clMenuBar) are totally unusable.
I would like to propose a set of functions that will work both in skinned and non-skinned modes.
For instance the function acclGrayText() would result in clGrayText if non-skinned and in the appropriate color value for the active skin if skinned.
Maybe you have a better solution to solve this predicament? :huh:
May 30, 2016 at 2:58 pm #55071SupportKeymasterI 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 #55073HeDiBoParticipant'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 #55086SupportKeymaster'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 #55100HeDiBoParticipantThat 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 #55165HeDiBoParticipantIn 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 #55171SupportKeymasterYou are right, such code will be added.
-
AuthorPosts
- You must be logged in to reply to this topic.