- This topic has 13 replies, 3 voices, and was last updated 12 years, 2 months ago by Hamilton.
-
AuthorPosts
-
July 16, 2012 at 4:13 am #35269HamiltonParticipant
Hi, the toxic skin doesn't work with the Transparent property on a TsSpeedButton. In one of my apps I use TsPanels with TsSpeedButtons on them in order to set the color of the button. This works fine for other skins but with Toxic the button color is set by the control regardless of what the Transparent property is set to.
To repro:
1. Put a TsPanel on a form, set SkinData.CustomColor to TRUE and set it's color to clRed.
2. Put a TsSpeedButton on the panel and set set Flat to TRUE.
3. Set the skin to BlueGlass and notice the TsSpeedButton is red.
4. Set the skin to Toxic and notice that the TsSpeedButton gets its colour independent of the panel color.
With TsSpeedButtons and other skins the Transparent property doesn't seem to do anything (the button gets the parent color regardless of how this is set) and I'm not sure if that isn't an issue too (if it is, it isn't one that bothers me at the moment but the first issue is a problem for me).
Regards,
Hamilton
July 16, 2012 at 4:43 am #48614HamiltonParticipantFurther investigation reveals this issue exists in other skins too. Some skins don't respect the border property either; I've documented this for some skins but it is a separate issue and may be by design.
Skins that don't respect transparency:
- Air
- Android OS
- Calcium
- Deep Purple
- Lucky
- Nautilus
- NeonNight
- Neutral2
- Neutral3
- Pulsar
- Smoky
- Snow Leopard
- Toxic
- Ubuntu
- Windows 8
- Winter2011
- WOT
Skin that respect transparency but not borders:
- Bejing
- Blue Plastic
- LikeOperaStyle
- Longhorn
- NextAlpha2
- Office 12
- Opus
- Steam
- Vienna
- Vienna Ext
- XPLuna
- XPSilver
- WMP 2008
- WMP11
- There may be more on this list, I wasn't thorough with this issue
Regards,
Hamilton
July 16, 2012 at 5:02 am #48615HamiltonParticipantYou can use the test app I supplied for the Afterburner issue to test this one:
1. Download the AlphaSkins.zip attached to the issue [topic='here']http://www.alphaskins.com/forum/index.php?showtopic=7110[/topic].
2. On line 26 of udMain.pas, change the skin path to the correct path on your PC.
3. Compile and run the program.
4. Click the button to load the skins.
5. Select the Toxic skin in the memo.
6. Notice the TsSpeedButton on the TsPanel to the right turns silver.
7. Click on the TsPanel and the background should change to blue, the TsSpeedButton stays silver.
8. Change the skin to NextAlpha and notice that the button color changes to match the skin.
9. Clicking through the list of skins will allow you to rapidly identify those with the transparency and border issues.
HTH
July 16, 2012 at 8:50 am #48616CheshireCatParticipantHi Hamilton, maybe you can try a different SkinSection for TsSpeedButton. In such cases I use the SkinSection TOOLBUTTON.
July 17, 2012 at 7:12 am #48620HamiltonParticipantHi CheshireCat, it's a good suggestion that works in many situations but doesn't help in this case unfortunately. With Toxic and the other skins I mentioned it seems that the transparency is ignored for all the SkinSections that I tried.
Regards,
Hamilton
July 27, 2012 at 1:47 am #48675HamiltonParticipantI retested TOOLBUTTON after talking with support and found that it does give transparency but loses the borders. I don't know why my previous test results were different but I most likely made a mistake. Anyway TOOLBUTTON does solve the problem I stated but creates a new one so I cannot use this solution. If there is no real solution or workaround to this issue I'll have to remove a bundle of skins that I, and many of our clients, like because they will not be compatible with all the program, and I don't want to have to do that! Using a separate skin for that form is perhaps an alternative I would consider but really would like this fixed not me having to work around limitations 🙂 IMO controls should always respect the properties. If you change the skin section is should change the way that the control is drawn, but the actual control properties should always be the final determinant as to whether or not some features are drawn at all (such as borders). What do others think, and what do you think Serge – can this be fixed?
Regards,
Hamilton
July 27, 2012 at 6:04 am #48676CheshireCatParticipantHi Hamilton, a separate SECTION should be a possible solution. Try the attached Skin. I've added a new SECTION named SPEEDBUTTON_TRANSPARENT.
Best regards
July 27, 2012 at 6:43 am #48677HamiltonParticipantHi CheshireCat,
Thanks for that. I tried the modified skin and found that whilst the transparency is now enabled I still don't have borders, and the color when a speedbutton has focus is strange (it is semi transparent but not transparent enough – which means the base color is modified by such an extent that some very strange and unattractive colors result, and also the legibility of any text on the button is greatly affected).
I emailed support about this issue last week and received a reply this morning and they are looking into a solution that will fix the issue for all of the skins I listed. I'm waiting to see what comes of that and will post the results back here when we have a solution.
Anyway I wouldn't spend too much time working on a solution for one skin when a global fix may be in the works but I do greatly appreciate your effort. Thanks again for your time 🙂
Regards,
Hamilton
August 4, 2012 at 6:32 am #48699SupportKeymasterHello Hamilton
If we look on behavior of standard SpeedButton control then we will see two possible modes of work : flat style and normal style.
This mode may be changed by using of the Flat property. Look the attached picture.
Flat style may be received in AlphaSkins with using of the TOOLBUTTON skinsection.
Normal style does not exists in some skins (borders are not visible there). I have changed all skins now and normal buttons will have borders already.
But, you need a transparent background in buttons also. Some skins have transparent background in buttons, but some skins have another style where background is filled by texture or gradient (like standard themed SpeedButton in normal style).
I can give you an easy solution in this case, you can change add a transparency to custom section in all skins by using the SkinManager.CommonSections property.
If you want, i'll prepare a demo for you later.
August 8, 2012 at 8:39 am #48723HamiltonParticipantHi,
My TsSpeedButtons are all flat, it's the only way to get transparency, but as you say this doesn't work for all skins. You mention that you have updated them – will they be available in the next release and fix the problem or will I need to do something with CommonSections too? If I do need to change the CommonSections property can you please tell me what values it is expecting as I have no idea how to use that property.
Cheers Serge and chat soon.
Regards,
Hamilton
August 20, 2012 at 12:39 pm #48794SupportKeymasterHello
Have you tried latest skins?
August 21, 2012 at 5:54 am #48796HamiltonParticipantHi Serge,
I reimported the skins and can see that the ones that didn't draw a border before do now, which is good.
The primary issue with the transparency has not been affected from what I can see; skins like BlueGlass that did use semi-transparency or full transparency before still do so, and those that did not before still do not. In my view this is a bug rather than a feature of the skin because the flat property is being ignored, and not a minor bug either given that this is the accepted standard way to color a button in Delphi.
At the moment the screens that rely on this feature are in beta release only and I'm able to tell the clients to choose a skin that does work. Prior to the full release in the middle of next month however I'll either have to get the skins fixed, set up a specific skin just for the affected forms, or use TSpeedButtons and turn off the skinning of those controls – so please let me know as soon as you're able if you think this is fixable or I'll have to implement a workaround.
I think the problem is well understood but I've uploaded two screen shots that show one of my screens with BlueGlass and Android OS skins; the BlueGlass skins works how I'd like but the Android skin isn't usable for my purpose in it's current state.
PS I still haven't touched the CommonSections property you mentioned and have no idea how to use that property or if it is required.
Regards,
Hamilton
September 10, 2012 at 4:05 pm #48919SupportKeymasterI think, new section should be added in all skins for implementing of flat behavior.
Now, you can use the CommonSections property, demo is attached.
September 12, 2012 at 2:25 am #48940HamiltonParticipantThanks Serge that is perfect, cheers! The CommonSections markup looks OK and whereas I don't know the full extent of what is possible with this property, the transparency setting you added is straightforward and simple to replicate. Thanks again – nice timing too, I was about to code a workaround in the next day or two and now I won't have to!
PS For anyone wanting to try the demo, note that the internal skin set in the project is not contained in the project so you'll probably have to change the skin path, set the current skin and set the active flag on the SkinManager for the demo to work.
-
AuthorPosts
- You must be logged in to reply to this topic.