Bombshell Tip from X
b.xavier at internet.lu
Sat Dec 10 08:31:02 CST 2005
First Thanks for Scott Rossi for the inspiration to find this bug
As you know, you can't display mac patterns of sizes different than 8, 16,
32, 64 or 128 pixels squared.
My problem was displaying a 20x20 pattern on the mac...
Standard buttons on the mac look aqua - nice but in a button bar you need
the gel button style (i think you call it the gel button style). 20x20 pixel
buttons - as prescribed by the Apple Higs - are not possible in standard
form - their borders are rounded and the button looks
couldn't-be-cheasier... And your 16 by 16 icon in the button really looks
cramped or bleeds over the buttons border....
So the solution was a 20x20 gel button skin - Alas when ported to mac, it
didn't work and looked like a mosaic of the pattern.
Weeks of reflection, changing all my buttons back to standard - NO - back
again to rectangle... Win95 style again... I was going crazy - how do you
make a modular button bar in rev that's cross platform and that respects
your metrics or "standards" in appearance?
So i saw Scott Rossi's Abacus. Noticed the pegs and wondered how would Scott
do his pegs if there was a pattern behind in the button... Then it pegged
Make a 32X32 transparent image with the 20X20 pixel pattern inside and it
Thanks very much to Jeff for his screenshot help...
The solution is not perfect because if you make your button 24 x 20 using
this pattern, you will see a black border appear instead of the pattern. But
creating icons at different sizes for patterns is not as hard as dublicating
images to simulate patterns behind buttons...
It works more reliably however than "standard xp patterns" where a button
and a menu will look awkward next to each other, that is one button skinned
xp and one w2k skinned...
Finally if you do not like the pattern, it's easy to switch, just swap image
ids for the pattern you like and you've changed all your button skins in an
instant - problem is that all stacks need some kind of refresh mechanism to
show the change - a palette/toplevel switch for example... So there's a bit
of work and screen refresh involved unfortunately... You may even need to
quit rev because the image id memory may stick around for the session...
But that covers the solution to using the same patterns on Windows and OSX
without any more hickups...
If someone who can do the following* easily can contact me with a nice
little script solution, i'd be happy to make a tool available soon with the
conversion of patterns to this cross-platform pattern "format"...
* The script would take an image and resize the image with the added
transparent pixels required to make it "compatible" for osx...
Anyway, hope you liked the tip. Im sure happy i found it and that it finally
looks the same on PCs and OSX. Thanks again to Scott and Jeff and Kweed who
raised the first alarm...
For the funny bit which i just noticed, in the screenshot i got from Jeff,
the "label" fields - transparent with 3d borders inherit that gel pattern...
strange... Is there a detail i missed?
open http://monsieurx.com/taoo - open source for open workflow for open
objects for open people....
More information about the use-livecode