wxMenu looks bad Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jacmoe
Experienced Solver
Experienced Solver
Posts: 64
Joined: Sun Feb 22, 2009 3:34 pm
Location: Denmark
Contact:

wxMenu looks bad

Post by jacmoe »

Why does wxMenu look like something dragged out of Win95 when I use images? :)

Image

I am tempted to use wxFlatMenu, but there must be some way to get a modern look. I mean: that's native on XP and Vista.
Seems like it is using some ancient win95 code under msw.

I can't figure out where the drawing is happening, is it in ownerdrawn?

Why hasn't people complained about it?

I've seen some posts in the past about the philosophy behind wxWidgets, but now I see that Ribboncontrol is in the list of suggested summer of code projects..

Why? All I need is a good looking menu.

Any ideas? :)
computerquip
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Feb 20, 2009 7:13 pm
Location: $(#wx)\src

Re: wxMenu looks bad

Post by computerquip »

jacmoe wrote:Why does wxMenu look like something dragged out of Win95 when I use images? :)

Image

I am tempted to use wxFlatMenu, but there must be some way to get a modern look. I mean: that's native on XP and Vista.
Seems like it is using some ancient win95 code under msw.

I can't figure out where the drawing is happening, is it in ownerdrawn?

Why hasn't people complained about it?

I've seen some posts in the past about the philosophy behind wxWidgets, but now I see that Ribboncontrol is in the list of suggested summer of code projects..

Why? All I need is a good looking menu.

Any ideas? :)
People don't complain about it because it's not what they get from wxWidgets. Could you show us a picture and possible the way your compiling your file?
jacmoe
Experienced Solver
Experienced Solver
Posts: 64
Joined: Sun Feb 22, 2009 3:34 pm
Location: Denmark
Contact:

Re: wxMenu looks bad

Post by jacmoe »

computerquip wrote:People don't complain about it because it's not what they get from wxWidgets. Could you show us a picture and possible the way your compiling your file?
That's comforting to know. :wink:

<edit> I did link to a picture - do you not see it? </edit>

Here's how I do the menu:

Code: Select all

	menuBar = new wxMenuBar;

	// File menu
	mFileMenu = new wxMenu;
	// New Scene
	wxMenuItem* newMenuItem = new wxMenuItem(mFileMenu, ID_TBFILENEW, wxT("&New Scene"), wxT("New Scene"), wxITEM_NORMAL);
	wxBitmap newBitmap(itemFrame1->GetBitmapResource(wxT("16x16/filenew.png")));
	newMenuItem->SetBitmap(newBitmap);
	mFileMenu->Append(newMenuItem);
	// Open Scene
	wxMenuItem* openMenuItem = new wxMenuItem(mFileMenu, ID_TBFILEOPEN, wxT("&Open Scene"), wxT("Open Scene"), wxITEM_NORMAL);
	wxBitmap openBitmap(itemFrame1->GetBitmapResource(wxT("16x16/fileopen.png")));
	openMenuItem->SetBitmap(openBitmap);
	mFileMenu->Append(openMenuItem);
...
...
	menuBar->Append(mFileMenu, wxT("&File"));
I am working from a vanilla SVN trunk wxWidgets (2.9), using default settings.

This is my preprocessor defines:
WIN32;_DEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__
I am linking to:
comctl32.lib rpcrt4.lib winmm.lib wsock32.lib wxmsw29ud_propgrid.lib
And, did I mention that it's in Vista? :)

Let me know if you need to know more.. :wink:

What's weird is that the menus without bitmaps looks just fine.. :?

<edit2>
Could it be that png is unsupported as native bitmap in windows?
</edit2>
Frank
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Jan 01, 2005 6:19 pm

Re: wxMenu looks bad

Post by Frank »

computerquip wrote: People don't complain about it because it's not what they get from wxWidgets. Could you show us a picture and possible the way your compiling your file?
That's not true.

I see the exact same problem. Add a bitmap to a menu and it looks like stoneage (wxMSW 2.8.9, VC2008, Vista X64 with Fixpack1).
jacmoe
Experienced Solver
Experienced Solver
Posts: 64
Joined: Sun Feb 22, 2009 3:34 pm
Location: Denmark
Contact:

Post by jacmoe »

I this not a problem for you people? :)

I mean, I haven't seen a single wxWidgets app using bitmaps in the menu..
Except those using wxFlatMenu..

If I wanted to fix this, where do I start? :)

Windows doesn't get a lot of wxLove these days - I can see that from following the wxWidgets SVN commmits. :wink:
jacmoe
Experienced Solver
Experienced Solver
Posts: 64
Joined: Sun Feb 22, 2009 3:34 pm
Location: Denmark
Contact:

Post by jacmoe »

Fixed! :D

Vadim and I fixed the issue:
http://www.nabble.com/wxMenu-with-bitma ... #a22640176

This is really great. :)
jacmoe
Experienced Solver
Experienced Solver
Posts: 64
Joined: Sun Feb 22, 2009 3:34 pm
Location: Denmark
Contact:

Post by jacmoe »

Well, semi-fixed.
As long as you don't use bitmaps for check and radio menu items. :wink:
Post Reply