Themes in menu bar (Beta 2)

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Themes in menu bar (Beta 2)

Post by *Lefteous »

"20.09.11 Fixed: Let Lazarus draw the main menu bar (64)"

The downside of this change is that the menubar theming cannot be disabled - although the options promises it.

This worked fine in Beta 1.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed Lazarus draws it always with themes on. I can use my own owner-drawn menu when themes are off...
Author of Total Commander
https://www.ghisler.com
sekular
Member
Member
Posts: 104
Joined: 2009-07-02, 19:39 UTC

Post by *sekular »

Not sure if this is related or if i should put it in another post. But since beta 2 update my menu items are cut off at the end. I tried different fonts and the original menu file.

I only see the problem in 64bit beta 2.

Image: http://img691.imageshack.us/img691/5964/47458760.jpg
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

Yes, cut off captions are related to this change. What Windows theme do you use?

--
Some technical info:

I've seen it happen only with few custom themes. I checked LCL sources and there's no obvious bug there. Although not a proper fix, there's simple workaround: http://web.hisoftware.cz/sob/download/lcl-win32-menu-cut-caption-workaround.patch
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, it must be related, I'm probably still using my own code the MEASURE the menu items, but leave the drawing to Lazarus.
Author of Total Commander
https://www.ghisler.com
sekular
Member
Member
Posts: 104
Joined: 2009-07-02, 19:39 UTC

Post by *sekular »

I use the uxtheme hack which copies over windows dll to allow you to use custom themes. Then i use a theme from deviantart.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2sekular
Which theme do you use from them which has this problem? I have pached the dlls too, both on XP and 7, so I can test it easily.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will try it, thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Should be fixed in beta 3, please test!
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Fixed in beta 3.
User avatar
Flint
Power Member
Power Member
Posts: 3505
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

I did not test it in Vista/7, but in XP x64 (Luna) menu bar theme background now does not work at all, or works very strange.

Some screenshots:
TC x64, menu theme is on
TC x64, menu theme is off
TC x32, menu theme is on
TC x32, menu theme is off

Issues I notice:

1. In x64 version when theme background is turned on, it's uniformly gray instead of being light-to-dark gradient (as in buttonbar).

2. In x64 version when theme background is turned off, the menu bar is divided into two parts with slightly (but clearly) different colors:
a) the part containing text has color rgb(224,223,227) — the same as buttonbar and the same as in x32 with theme off;
b) the empty part of the menu bar has color rgb(224,226,235) — the same color as it had when theme was turned on.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

1. I don't think XP themed menubar is even supposed to have gradient. While some apps have it (Windows Explorer, Internet Explorer), it's not native menubar, but rather custom "menu in toolbar". Apps with native menus (e.g. Notepad) don't have any gradient. But I must agree that gradient in TC looked better together with button bar.

2. The color of empty part is correct for menubar, so it would seem background of menu items is wrong. But with themes disabled, menubar uses standard dialog color and it's the same as background of items, so it makes the background of empty space wrong.
User avatar
Flint
Power Member
Power Member
Posts: 3505
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Sob wrote:1. I don't think XP themed menubar is even supposed to have gradient. While some apps have it (Windows Explorer, Internet Explorer), it's not native menubar, but rather custom "menu in toolbar". Apps with native menus (e.g. Notepad) don't have any gradient. But I must agree that gradient in TC looked better together with button bar.
Either with or without, but 64-bit TC should not look so much different from 32-bit TC. (But I personally prefer gradient too.)
Sob wrote:2. <…> But with themes disabled, menubar uses standard dialog color and it's the same as background of items, so it makes the background of empty space wrong.
Yes, exactly.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming the fix!
1. In x64 version when theme background is turned on, it's uniformly gray instead of being light-to-dark gradient (as in buttonbar).
That's how Lazarus draws the bar. Maybe I can change it by hacking the Lazarus library...
Author of Total Commander
https://www.ghisler.com
Post Reply