|
|
Home » U++ Library support » Look and Chameleon Technology » A little theming
Re: A little theming [message #18826 is a reply to message #18820] |
Sat, 25 October 2008 11:31 |
|
unodgs wrote on Fri, 24 October 2008 15:53 |
Quote: |
PS: How's your Oxygen style progressing? With two high quality custom themes, and one reproducing the “modern” Windows look (like in ToolKit Pro), we will have great eye-candy possibilities.
|
The problem is I have no time right now, as always (one commercial project is almost finished the next is coming..), but I'll try to get back to it ASAP.
|
ASAP? Why?
Will not be greater for make in u++ this functionality?
Automation evidense of firm we can integrate in U++ with PostGres SQL!
John.
|
|
|
Re: A little theming [message #18827 is a reply to message #18818] |
Sat, 25 October 2008 11:40 |
|
cbpporter wrote on Fri, 24 October 2008 12:01 |
tojocky wrote on Fri, 24 October 2008 08:59 | What about to create a visual theme editor mechanism?
I thing that will be greater!
|
That would be great, but I don't know how it could be possible. When I started doing this theme, I thought that all that working with the images and fiddling to get shadows perfect would be horrible. But instead, that was the easies part. Figuring out how to set thing inn Chameleon so that it looks the same under all platforms was/is the hard part. It would be even harder to incorporate that into a visual editor. But it is something to think about. If you have any ideas, please share.
OTOH, I've been thinking a lot about the previous idea with an achieve with and XML and a bunch of pictures. It would make the theme more editable by the non technical people. Sure, TheIDE's image editor is quite excellent after you get used tot it (but I did manage to crash it once), but you have to write code to apply those images and extra information to a theme and export it as a shareable binary. With and XML, people could edit it easily and use their favorite image editing program. Yet, U++ theming engine is not really targeted by anybody else than us, and I think we can handle a little code .
|
I thing that will be great to save style theme in the extern file! About visual theme to meke an interface that can set style of ctrls (form, button, edit field, ...). It is in the start!
|
|
|
|
|
Re: A little theming [message #18909 is a reply to message #18818] |
Fri, 31 October 2008 14:40 |
|
mirek
Messages: 14164 Registered: November 2005
|
Ultimate Member |
|
|
cbpporter wrote on Fri, 24 October 2008 05:01 | OTOH, I've been thinking a lot about the previous idea with an achieve with and XML and a bunch of pictures. It would make the theme more editable by the non technical people. Sure, TheIDE's image editor is quite excellent after you get used tot it (but I did manage to crash it once), but you have to write code to apply those images and extra information to a theme and export it as a shareable binary. With and XML, people could edit it easily and use their favorite image editing program. Yet, U++ theming engine is not really targeted by anybody else than us, and I think we can handle a little code .
|
Not a bad idea. IMO, it should be possible to do this on top of existing chameleon.
In fact, the most simple thing to do (about 20 lines of code) is to add import/export of Ctrls.iml (to/from directory with .png files). Add one .png, put hotspots in the name somehow and you are quite configurable... (minus those pesky details....)
Mirek
|
|
|
|
|
|
|
|
Re: A little theming [message #21518 is a reply to message #21465] |
Sun, 24 May 2009 10:58 |
cbpporter
Messages: 1425 Registered: September 2007
|
Ultimate Contributor |
|
|
Mindtraveller wrote on Thu, 21 May 2009 21:02 | Could you please post a pair of screenshots of new themes?
|
Sure!
EDIT: old image removed, see new one
As you can see Stone (the second one) is not quite ready yet, while the first one looks IMO quite mature. There are some colors I'm going to tweak in Default (need better name) and I'll finish Stone in 1-2 updates.
I still need to re skin DropList and Drop choice according to latest style. Is anybody a big fan of the difference between DropChoice and DropList skin? Because it may be eliminated.
ProgressIndicator is also done. (BTW: Why such a long name? How about ProgressCtrl?)
Next I was going to do SliderCtrl, but since it doesn't have a style, it raises some interesting problems. I can add the style very easily and know how it's going to look. That's not the problem. The problem is that the Style is going to be present only in SVN version of CtrlLib. And I can't use non-official releases for the only application where Skulpture is the default look. So I would have to maintain two versions of Skulpture. I'll post the Style here after it is ready and once it is included in 20xx.1 I'll update Skulpture.
So I'll do ArrayCtrl next. More people are probably using ArrayCtrl vs. SliderCtrl anyway.
[Updated on: Tue, 26 May 2009 19:29] Report message to a moderator
|
|
|
|
Re: A little theming [message #21520 is a reply to message #21519] |
Sun, 24 May 2009 11:33 |
Didier
Messages: 697 Registered: November 2008 Location: France
|
Contributor |
|
|
The compile problem is not only on MINGW, there is the same problem on linux ==> the "problem" comes from the compiler GCC.
Here is a valid correction but it needs to be optimised (on point 2):
In Theme.cpp
------------
1 - I removed the second template parameter: V is supposed to be a Value type since you use ' v.Is<Upp::String> ' just let C++ inheritance do it's work.
//template <typename T, typename V>
template <typename T>
inline void SetIfNotNull(T& t, Value v)
{
if ( v.Is<Upp::String>() && ((String)v == "null") )
t = Null;
else
if (!IsNull(v))
t = v;
}
2 - You have to add a temporary object: because problems when using temporary references: It is not excluded that will use the address of the passed object which would be completely false for a temporary reference. Even though the problem is still here after correction (img is a temporary to the scope) at least it is visible while reading the code and not left to compiler will.
Value Theme::StringToObject(const String& s, const String& def) {
Vector<String> v = Split(s, ' ');
if (v.GetCount() == 0)
return Null;
if (v[0] == "png") {
Image imag = PNGRaster().LoadFileAny(AppendFileName(dir, def));
ImageBuffer img( imag );
if (img.IsEmpty())
In Theme.h
----------
3 - remove the from the following line
void Theme::LoadEditField(EditField::Style& d, const VectorMap<String, String>& set, const String& dir, const String& file);
Question:
---------
1 - Is there some documentation for the 'theme.ini' file syntax ?
2 - Can I use several themes in one application (like have two tabs not using same theme) or add in 'theme.ini' several different versions of skin for a ctrl ?
Skulpture looks good on linux
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Dec 14 15:19:49 CET 2024
Total time taken to generate the page: 0.02589 seconds
|
|
|