wxRibbonBar Office 2010 and Metro Art Providers

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

wxRibbonBar Office 2010 and Metro Art Providers

Post by iwbnwif »

I have put together two wxRibbonArtProvider classes that make a wxRibbonBar look similar to Office 2010 and Windows 8 Metro respectively.

At the moment they are still a bit messy but are okay. If anyone is interested in copies at this stage, just ask.
office2010.PNG
office2010.PNG (37.84 KiB) Viewed 10471 times
metro.png
metro.png (31.5 KiB) Viewed 10471 times
There are a couple of problems that I would like to ask about:

1. Unlike the old MSW ribbon panels only have a divider at their right end, however I can't find a way to add a few pixels to the panel to be able to draw the divider. If I draw it in the current panel rect it is too close to the controls.

2. I haven't been able to figure out the HSL adjustment of colours and the macros LikePrimary and LikeSeconary. I have tried using an online RGB to HSL converter but the results from these macros don't seem to match up at all. This is less of a problem for the Metro provider because there are no gradients and actually I would like to use wxSystemColour as much as possible.

Thanks for any advice.
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by Cursor »

Oh yes ! Looks good, I want it ;)

Do you plan to submit it to wxWidgets for integration ? Or do you plan to release it in any licence ?

Best regards

Emilien
What is little and green, witch go up and down ??
Yoda playing with the force.
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by iwbnwif »

Hi Emilien, sorry I haven't had time to work on this for the past few days.

I simply want to donate it to wxWidgets if it is of interest to them, I don't require any licence or credit etc. Its really just a straightforward adaptation of the existing MSW art provider.
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by Cursor »

If you want to offer your code to wx, you just have to submit an enhancement patch (http://trac.wxwidgets.org/wiki/HowToSubmitPatches).
If your code is clean and the feature usable, there is no reason it will not be integrated.

Dont hesitate to submit a patch like this, the feature looks good; problems seems to be really minor (little visual adaptations).
Moreover, when you patch, developpers can enhance your code, even if it is not integrated immediately.

Best regards
What is little and green, witch go up and down ??
Yoda playing with the force.
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by iwbnwif »

Thank you for the pointers. I am away for a week but will tidy up the two classes as much as I can and then submit them.

The main problem with my code at the moment is that it is using RGB colours so although they look fine on the default MSW colours, I think they will look awful if the user changes their colour scheme!
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by Cursor »

If you think you will have a fix at short term, take the time to fix that. Otherwise, dont hesitate to submit your patch and describe the problem in the ticket. Someone probably can look at it :).
As I am interested by this functionality, I will intend to look at it too.
What is little and green, witch go up and down ??
Yoda playing with the force.
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by iwbnwif »

Hi,

Sorry for the delay. I have spent some time today trying to work out the relationship of the colours, but haven't found an answer yet.

Attached are the two files for the Metro look. I don't feel that the code is clean enough to submit yet but would welcome any opinions.

I have a three file limit, so will add the Office 2010 look in the next post
Attachments
art_metro.h
(4.4 KiB) Downloaded 377 times
art_metro.cpp
(38.76 KiB) Downloaded 387 times
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

Re: wxRibbonBar Office 2010 and Metro Art Providers

Post by iwbnwif »

Office 2010 look art provider ...
Attachments
art_office2010.h
(4.43 KiB) Downloaded 331 times
art_office2010.cpp
(44.32 KiB) Downloaded 351 times
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Post Reply