Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > GUI Customization > Making a "View" Metal?

Making a "View" Metal?
Thread Tools
EatingPie
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Blueberry!
Status: Offline
Reply With Quote
Feb 3, 2005, 07:14 PM
 
I did the brushed hack and metalization thread, and am still looking for a way to make Views metal.

In Interface Builder, you can drag a "Custom View" from the "Containers" templates into a new interface instance. The View does not need to be wrapped in a Window (ie you do not need to create a Window resource), as it seems to automatically have a dialog window associated with it.

I'm guessing that these Views inherit their window wrapper from something in the Frameworks. Does anybody know if this is true, and which framework it is (ie /System/Library/Carbon.framework)?

I'd appreciate any help.

-Pie

Just because I like pie doesn't mean I'm a pussy.
     
smeger
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Feb 3, 2005, 07:20 PM
 
I don't know of a way to explicitly make a view metal. All windows (at least in Cocoa) have a content view associated with the window. The content view is the container for all of the other views in the window.

In a brushed windows, it's transparent - it's not the view that draws the brushed texture, it's the window frame.

What are you actually trying to do?
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
EatingPie  (op)
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Blueberry!
Status: Offline
Reply With Quote
Feb 10, 2005, 12:46 PM
 
Originally posted by smeger:
I don't know of a way to explicitly make a view metal. All windows (at least in Cocoa) have a content view associated with the window. The content view is the container for all of the other views in the window.

In a brushed windows, it's transparent - it's not the view that draws the brushed texture, it's the window frame.

What are you actually trying to do?
In a nutshell, I want EVERYTHING brushed. I wrote the Brushed Metal Hack that makes a (almost) fully brushed interface without ShapeShifter. (My motivation is outlined at the beginning of that article.)

The only drawback is that certain resources do not go brushed, they take on this "grey striped" look due to a bug in the way a certain resource is used in Panther (ie, Panther tries to make aqua stripes from the brushed resource by using a 2x2 pixel subsample). Examples include the System Preferences background, and the Login Window.

I have narrowed the problem to resources that contain only Views. These have that pinstriped-gone-bad look. I'm not sure I totally understand your post, but if the content view is transparent, I want to get at the window resource "below" that view. In Interface Builder, it seems to be created automatically when you just make a view. But where does that window come from? It must be some other resource? If I can apply the brushed texture to that window, I would hope all Views would then look brushed.

Hope that explains it better.

Thanks.

-Pie

Just because I like pie doesn't mean I'm a pussy.
     
smeger
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Feb 11, 2005, 03:12 AM
 
I think your problem is caused by a limitation of Cocoa. When it tiles a PPAT resource, it only uses the top-left 8x8 pixels. Anything else is ignored.

The only way to get around this is to use patterns that are 8x8 pixels (you're using larger ones if you're using Max's Brushed resources), or to use ShapeShifter.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
EatingPie  (op)
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Blueberry!
Status: Offline
Reply With Quote
Feb 17, 2005, 10:22 PM
 
Right that is the problem! (I think I referred to that in my original post, though I called it a 2x2 bug.) And that's exactly what I'm trying to solve.

I am trying a new approach. Forget limiting the PPAT. The problem occurs only when you have a View resource that has no underlying Window (ie you created the View without first explicitly placing it in a Window resource). The View inherits *some* underlying Window from *somewhere*.

Where is that underlying Window resource located? I believe that is the key to solving the 8x8 bug and allowing a completely consistent metal interface.

-Pie

Just because I like pie doesn't mean I'm a pussy.
     
smeger
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Feb 18, 2005, 02:14 PM
 
This isn't how it works. Interface Builder does some mumbo-jumbo to present a view without a window to the user, and it does that by presenting it inside of a window.

In an actual application, this isn't the issue - views are transparent by default, unless the application designer draws something into them (they usually do). The window itself draws its background.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
foobars
Mac Elite
Join Date: Jan 2001
Location: Somewhere in the land surrouding Fenway Park
Status: Offline
Reply With Quote
Feb 18, 2005, 08:07 PM
 
Originally posted by EatingPie:
Where is that underlying Window resource located? I believe that is the key to solving the 8x8 bug and allowing a completely consistent metal interface.
You aren't going to be able to fix this through any resource modification. Views can be programatically added to windows (infact they have to be in order to be shown). An example would be toolbars. When a user clicks a toolbar, the window's view swaps. This is all done in code. To make the swapped in view brushed it's likely you would have to remind the window it's textured and you could only do that by explicity messaging the window a runtime. You'd need an APE or something to do this.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,