Jump to content

Kaleidoscope Scheme to Appearance Theme Conversion


Recommended Posts

Here's the latest source code:

 

http://www.d.umn.edu/~bold0070/projects/scheme2theme/scheme2theme%200.5.zip

 

It's much more extensive now. This should work for buttons in all schemes and tabs in newer schemes (i.e. Scherzo!, System 7)

 

I'll have to putz a bit with some items in older schemes because some things are just color table shifts of platinum.

Link to post
Share on other sites

How did Greg's permission go?

 

I imagine that since Kal is not really a revenue stream for them anymore, and never was for the scheme designers, they couldn't really care less, and thus were gracious enough to give permission. Darn nice of him to do so.

Link to post
Share on other sites

Yep, absolutely - that was awesome. It was an e-mail that he sent to me specifically, so I'm not too sure if I should post it directly on here, but basically he said that he didn't have any problem with it, and actually went so far as to ask if we needed any support. If there's an issue with this, I can forward the message to a moderator here for verification purposes. For that matter, a moderator could probably contact Greg directly as well. He seems like a cool, approachable guy.

Link to post
Share on other sites

All tabs are done now, and that required me to develop image transformations. (rotate, flip)

 

Notice the hacked AppearanceSamplePPC about box. Nothing samples all of the tab panes with text. It wasn't a good choice because I can't make that window inactive.

 

These should be identical to the ones Kaleidoscope displays, with the exception that I fixed some text bounding boxes. The boxes are the same as they are for Apple Platinum now. It is normal for text to not rotate on its own for the east and west tabs.

 

The original scheme, with Kaleidoscope running, is included for comparison.

Picture-21.gif.6ece28780becd686f7ae8e060ba47fa6.gif

Picture-1.gif.836278fc47b64bcf4277d3e0ac171b5f.gif

Link to post
Share on other sites

Slowly but surely.

 

Check boxes and radio buttons are working now. I've never seen alternate checkbox styles activated in a theme, there's no option anywhere to turn them on, but I put them in there anyway.

 

Apparently the code only can convert Scherzo! now. OOPS

 

I have to build in a lot of exceptions, error handling, and check for scheme versions and such. I think I'll focus on this scheme for now and worry about all of that later.

 

My control.c file is getting enormous, I need to think about how to split that down because it will be many many times larger the way things are going.

5a1d03b65fae8_Picture8.png.ccec239b00fbf60d9c3c0b6400f9ee16.png

Link to post
Share on other sites

I got the breakdown of control.cpp done. This is much more manageable now.

 

I ran into an issue with root menu item titles. In Kaleidoscope, the titles overlap by 1 pixel, by means of setting the left bound 1 pixel to the left of the default bounding box. When I attempt to do this in a theme, the extra pixel does not draw on the screen, nor will it draw if I attempt hanging off from the right side. So there's a little issue there, maybe something in the 'tinf' resource will help but I doubt it. I'll just play with it and see what happens.

 

I found something interesting in the Hi-Tech checkbox layo - they used a NULL type image to make the checkbox redraw, so maybe I'll try that.

Link to post
Share on other sites

Tonight, Pop-up Buttons and Arrow Buttons are working, also extensive work was done to hush up all of the errors for non-Scherzo schemes so that it will work on all schemes again.

 

There's a lot left to do:

 

Substitute platinum with proper palette for missing items in schemes

Manage different scheme versions and default 'cinf's

Figure out where to find window background colors in newer schemes

 

layo

Fix ppat VH structure backgrounds (currently pattern starts from incorrect origin, must be fixed by using 'frme's. You can see this problem by converting Antique and looking at the tabs.)

All sliders

All scroll bars

Newer window frames (wnd#)

Disclosure triangle

Little Arrows

Progress bars, indeterminate progress bar

Image well

 

frme

Design a frame maker software module

Groups / separators

Edit Text frame

List box Frame

Dialog Content Edge

Window Header

Window Placard

 

I forgot to mention that I finally figured out how the 'tinf' resource works, so now the converter actually spits out a theme that runs all on its own once you run it through Rez and change the type/creator codes.

Link to post
Share on other sites

I ran into a glitch with popup buttons. Appearance manager uses clr# color IDs 0, 1, 2 for normal, inactive, and pressed text instead of 17, 18, 19. Because of this, popup button text shares the same color as Alert Window text! There's no fix for that short of hacking the appearance manager. I'm not that crazy.

 

So here it is, with the wrong text color (should be white)

Picture-3.gif.06e14a2b50c29b7acf0cafc07722ec1b.gif

Link to post
Share on other sites

This is parsed directly from a wnd# resource. I have done non-stretching parts of the top and bottom.

 

Stretch regions are going to be tricky. Sides with 1 or 2 stretch regions should be possible. Because I can only split things in half proportionally in themes, I think that we're stuck with 2^n numbers of stretch regions, otherwise they won't be evenly spaced. Even with, say, 4 stretch regions, all of the little "islands" would have to be the same size. I can calculate anything I want in the converter program, but unfortunately I don't have math functions available directly in themes, all I can do is cut things in half. There may not be many schemes that use more than 2 stretch regions per side, though.

 

The Close, Zoom and Collapse boxes will require the same color table combination code as the scroll arrows before they will work properly.

 

This wnd# code is VERY MESSY, most of the code is switch statements. There is nothing done for stretch regions, islands, or left/right sides yet. I did it that way to avoid copy/pasting the same code chunks with little changes, but I think there comes a point where the copy/pasting has an advantage.

Picture-2.gif.39017581824054d23db4e2c4461f4455.gif

Picture-3.gif.ae0e2395cecf227ccfc9412758276de7.gif

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...