Home » U++ Library support » Look and Chameleon Technology » Office Ribbon skin
Re: Any function to draw gradient color? [message #11741 is a reply to message #11708] |
Mon, 24 September 2007 17:22 |
piratalp
Messages: 26 Registered: September 2007 Location: Argentina
|
Promising Member |
|
|
luzr wrote on Sun, 23 September 2007 05:47 | ff / ss
Anyway, I have had a look at it.
First, is there a way how to obtain these values from OS? Would be nice set of complementary Color values, IF it is possible to have a reasonable emulation when not available (e.g. in Linux). If not, this should be hidden in ribbon emulation:
Second you do not really need this palette in U++ to get things work. You can store them into Value for specific chameleonized elements IMO.
Mirek
|
Hehe, so we're the only ones having a fff color table? :s
Well, going to the questions.. There is for sure a way to retrieve them, how? I DON'T KNOW, I never liked windoze internals.. but they are set by XP when you change color scheme (usually Blue -default-, silver and olive) and ProfessionalColorTable always reflect correct colors acording to system palette..
Of course there is _very_ reasonable emulation and it is already done and working (and looking nice by using current limited set of SColor functions. I called it ChSystemPalette(). OTOH final Office 2007 Blue palette is harcoded in program, so it works in Linux, Mac, Windows, BSD.. no matter the platform, Office 2007 comes with its own set of palettes independent from system colors.. I plan to make other Office 2007 palettes and custom ones with very nice look but that will be when I have a bit of time, now I'm very busy chameleonizing widgets that were harcoded until now..
For the second.. Yes, it was exactly what I was doing but it had some cons, major one the need to have 8 set of values for each existing widget, and the need to add a new set each time a new widget needs to be chameleonized with this kind of skin, so I decided to drop all thos Values from ChPalette and replace them with a set of colors for: Face (Normal, Highlight, Pressed & Disabled states) wich are used for practically any widget that does not have _very_ customized look, the rest have their own set of palette colors (e.g. Buttons -including Ok & Cancel ones-, Menus, ScrollBars and ProgressBars)
It sounds a bit more complicated than it is, so let's illustrate it:
What I was doing (sth like what you proposed):
Quote: |
struct ChPalette {
Value Background; // Used for window bg
Value Text; // Used as global text color
Value Button; // Normal button state
Value ButtonText;
Value ButtonHighlight;
Value ButtonHighlightText;
Value ButtonPressed;
Value ButtonPressedText
Value ButtonDisabled;
Value ButtonDisabledText
// These last 8 repeated for every existing widget
}
|
This way I had to hardcode widget painting INSIDE palette and add lots of members to the struct, so I decided to refactor it and look more like ProfessionalColorTable (fff )
Quote: |
struct ChPalette {
Color FaceLight;
Color FaceMedium;
Color FaceNormal;
Color FaceDark;
Color FaceBorder;
Color FaceText;
// So with this kind of palette it is the skin wich decides how widgets are rendered
// This set of colors repeat changing Face with Highlight, Pressed & Disabled and are used for every widget, except the ones I mentioned above, for which this set of 4-state * 6 components is repeated
}
|
Hope it is more clear now...
Regards
|
|
|
|
|
Office Ribbon skin
By: mirek on Mon, 10 September 2007 19:15
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Mon, 10 September 2007 20:33
|
|
|
Re: Any function to draw gradient color?
By: mirek on Mon, 10 September 2007 21:33
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Tue, 11 September 2007 19:28
|
|
|
Re: Any function to draw gradient color?
By: mirek on Sat, 15 September 2007 10:30
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Wed, 19 September 2007 20:58
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Thu, 20 September 2007 00:25
|
|
|
Re: Any function to draw gradient color?
By: mirek on Sun, 23 September 2007 10:40
|
|
|
Re: Any function to draw gradient color?
By: mirek on Sun, 23 September 2007 10:41
|
|
|
Re: Any function to draw gradient color?
By: mirek on Sun, 23 September 2007 10:47
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Mon, 24 September 2007 17:22
|
|
|
Re: Any function to draw gradient color?
By: mirek on Mon, 24 September 2007 19:29
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Mon, 24 September 2007 21:19
|
|
|
Re: Any function to draw gradient color?
By: mirek on Mon, 24 September 2007 23:56
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Tue, 25 September 2007 19:56
|
|
|
Re: Any function to draw gradient color?
By: mirek on Tue, 25 September 2007 23:00
|
|
|
Re: Office Ribbon Skin
By: piratalp on Wed, 26 September 2007 00:34
|
|
|
Re: Office Ribbon Skin
By: mirek on Wed, 26 September 2007 20:13
|
|
|
Re: Any function to draw gradient color?
By: Zardos on Mon, 10 September 2007 23:48
|
|
|
Re: Any function to draw gradient color?
By: unodgs on Tue, 11 September 2007 08:50
|
|
|
Re: Any function to draw gradient color?
By: piratalp on Tue, 11 September 2007 19:54
|
|
|
Re: Office Ribbon skin
By: sergei on Mon, 24 September 2007 02:51
|
|
|
Re: Office Ribbon skin
By: mirek on Mon, 24 September 2007 09:11
|
|
|
Re: Office Ribbon skin
By: piratalp on Mon, 24 September 2007 17:49
|
|
|
Re: Office Ribbon skin
By: sergei on Mon, 24 September 2007 19:28
|
|
|
Re: Office Ribbon skin
By: piratalp on Mon, 24 September 2007 21:05
|
|
|
Re: Office Ribbon skin
By: sergei on Mon, 24 September 2007 21:41
|
|
|
Re: Office Ribbon skin
By: piratalp on Tue, 25 September 2007 17:11
|
|
|
Re: Office Ribbon skin
By: sergei on Mon, 24 September 2007 23:59
|
|
|
Re: Office Ribbon skin
By: sergei on Tue, 25 September 2007 18:12
|
|
|
Re: Office Ribbon skin
By: piratalp on Wed, 26 September 2007 00:07
|
Goto Forum:
Current Time: Fri Mar 29 05:45:43 CET 2024
Total time taken to generate the page: 0.01019 seconds
|