On Oct 24, 2008, at 16:01 , Peter Johnson wrote:

> Here's a screenshot of a similar Metal window built with Cocoa/ 
> Interface Builder.  It doesn't have the same border.  (I left a  
> large border on the bottom so that you can see it is textured.)

Yes, well. If you set the textured attribute on a Cocoa window that is  
indeed what you get. You will get the same in Qt if you build against  
Cocoa. Carbon keeps the old look. So, if you build against Carbon you  
get the extra border.

In general, you really *aren't* supposed to used metal windows in  
Leopard, instead use something like the unified toolbar look. We can  
maybe try to add some consistency, but we wouldn't really be using  
metal windows. If you want to get a similar effect on your metal  
Carbon windows NOW, you can approximate it by using setting the  
kHIWindowBitTexturedSquareCorners on the window. So, for your code:

int main(int argc, char *argv[])
{
     QApplication app(argc, argv);
     MainWindow window(NULL);
     window.setCentralWidget(new QTextEdit("TEST"));
#ifndef QT_MAC_USE_COCOA
     WindowRef windowref = HIViewGetWindow(HIViewRef(window.winId()));
     const int SquareCorners[] = { kHIWindowBitTexturedSquareCorners,  
0 };
     HIWindowChangeAttributes(windowref, SquareCorners, 0);
#endif
     window.show();
     return app.exec();
}

Remember that by default scrollareas have frames in Qt, so you'll need  
to specify NoFrame to get the right look for the text edit.

We'll try to get around to getting this more consistent before the  
final release.

-- Trenton
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to