Page 1 of 1
Themed Buttons on BMP background
Posted: Fri Jul 14, 2006 1:45 pm
by James Bott
Themed buttons on a bitmap background (on a dialog) do not have a transparent background so there is an ugly one pixel gray border around them. I also notice that isAppThemed() always returns .f. even when I have a manifest file. Is this a bug, and could this be the reason?
Using May 2006 build and Harbour and XP Pro SP2.
James
Code: Select all
function doit()
local oDlg,oBrush,cName:=space(20),oBtn
define brush oBrush file "bluegrad.bmp"
define dialog oDlg title " with Brush" brush oBrush
@ 1,1 get cName of oDlg
@ 2,1 say oSay prompt "Name" of oDlg
oSay:lTransparent:=.t.
@ 3,1 button oBtn prompt "Ok" action oDlg:end()
oBtn:lTransparent:=.t.
activate dialog oDlg centered
return nil
Re: Themed Buttons on BMP background
Posted: Fri Jul 14, 2006 6:16 pm
by Maurilio Viana
James, I think TButtonB don't get transparency and don't change face color because Win API. But lets wait for words by Antonio, he ever have a solution.
Regards
Maurilio
Posted: Fri Jul 14, 2006 10:26 pm
by Antonio Linares
James,
It is a Windows theme issue (we already reviewed this with Brian Hays). Here it is how it looks with XP standard blue theme:
Here you see it with a different XP theme (it looks ok):
The FWH exe is the same in both samples.
Posted: Fri Jul 14, 2006 10:29 pm
by Antonio Linares
James,
Regarding IsAppThemed(): this function just checks if the manifest file is linked into the EXE. We may need to modify it to detect an external manifest file.
Posted: Fri Jul 14, 2006 10:51 pm
by James Bott
Antonio,
>Here it is how it looks with XP standard blue theme:
It is even worse when the button is not in focus--the gray border is on all sides of the button.
>It is a Windows theme issue
This is very dissapointing. Since many (if not most) users are using the standard blue theme, we cannot produce a decent looking themed button on a colored or bitmapped dialog in our applications without many users seeing the odd display.
What theme are you using in the version without the gray outline?
Thanks for the isAppThemed() explaination. It would be helpful if isAppThemed() would detect external theme manifest files. Otherwise it is more difficult to test small samples of code since you need to build a resource file for each one.
James
Posted: Fri Jul 14, 2006 11:23 pm
by Antonio Linares
James,
> What theme are you using in the version without the gray outline?
As you may know, Windows XP themes support for non standard ones is blocked. To unblock it and use many available free themes on Internet, you have to replace uxtheme.dll with a patched one.
There are lots of them. I use one that looks like Windows Vista one.
Regarding IsAppThemed(), yes, we are going to modify it asap.
Posted: Sat Jul 15, 2006 8:15 am
by James Bott
Antonio,
>As you may know, Windows XP themes support for non standard ones is blocked. To unblock it and use many available free themes on Internet, you have to replace uxtheme.dll with a patched one.
I understand. We can solve the problem for ourselves, but one cannot distribute an application with buttons that look bad with the standard XP themes. Our applications would look very unprofessional. So, in order to avoid the problem, our only solution is to avoid using color and bitmap backgrounds on dialogs. Unfortunately, more color and graphics is the current trend in applications.
I had even figured out how to paint gradient backgrounds on windows and dialogs, but now I guess I can't use them because of the button problem.
Thank you for looking into fixing isAppThemed to work with external manifest files.
James
Posted: Sat Jul 15, 2006 12:11 pm
by Antonio Linares
James,
Microsoft applications have the same problem, but they use lighter colors for the background. Its the XP theme that makes a gradient from the surounding background color.
Have a look at Microsoft Visual C++ Express edition:
From here:
As I have commented you, this is a Windows issue, its not a FWH one.
Posted: Sat Jul 15, 2006 12:49 pm
by Antonio Linares
James,
When you use an external manifest file, how do you name it ? Thanks,
Posted: Sat Jul 15, 2006 6:23 pm
by James Bott
Antonio,
>Microsoft applications have the same problem, but they use lighter colors for the background. Its the XP theme that makes a gradient from the surounding background color.
I have noticed that too. That does seem to be a workaround although very limiiting.
>As I have commented you, this is a Windows issue, its not a FWH one.
I understand, I'm not blaming FW, just expressing my dissapointment in the situation. We could design some really nice looking apps if this wasn't a problem.
>When you use an external manifest file, how do you name it ?
[application name].exe.manifest
James
Posted: Sun Jul 16, 2006 9:58 am
by Antonio Linares
James,
>> When you use an external manifest file, how do you name it ?
> [application name].exe.manifest
We have modified IsAppThemed() to detect such external file too.
We are emailing you a new FiveHC.lib for your review. Thanks,
Posted: Mon Jul 17, 2006 11:47 am
by Maurilio Viana
Antonio Linares wrote:
There are lots of them. I use one that looks like Windows Vista
Antonio, I'm searching for a "Vista Like Theme" for any weeks...
Where you downloaded it?
Regards!
Maurilio
Posted: Mon Jul 17, 2006 4:26 pm
by Antonio Linares
Posted: Mon Jul 17, 2006 6:27 pm
by Maurilio Viana
Thanks a lot, Antonio!
Regards
Maurilio