[info-mcl] Tab views

Octav Popescu octav at cmu.edu
Sun Sep 7 09:09:50 CDT 2008


Terje Norderhaug wrote:
> On Sep 6, 2008, at 7:24 PM, Octav Popescu wrote:
>>>> More important, this is not the standard tab aspect in OS X 10.5.  
>>>> You can see in the second capture what they look like in one of 
>>>> the  System Preferences panes. Any chance to make it look that way? 
>>>> I  don't know if that look is available in Carbon though. Here's 
>>>> the  HIG page that talks about it:
>>>>
>>>> http://developer.apple.com/DOCUMENTATION/UserExperience/Conceptual/ 
>>>> AppleHIGuidelines/XHIGControls/chapter_19_section_7.html
>>>>
>>>
>>> The style of the tabs can be controlled through the :version  
>>> attribute of the :HIThemeTabDrawInfo record passed to  
>>> #_HiThemeDrawTextBox as inDrawInfo. Setting :version to 1 makes the  
>>> tabs appear as segmented controls (modern appearance) while  a 
>>> :version of 0 produces traditional tabs (legacy appearance). The  
>>> clipping or size of the tab view will have to be changed to make  
>>> segmented controls fit.
>>
>> This does make a change, see test-mpv3. I can move the text to the 
>> right position, but as you see the text and the tabs don't overlap. 
>> How can I fix this? It also seems like each button starts with a 
>> round left side, they're not part of one continuous segmented control.
>
> The text and tab aligns in the enclosed demo. Getting the proper round 
> sides requires upgrading the HIThemeTabDrawInfo to have additional 
> properties for :kind and :position. The latter can be used to specify 
> whether the tab is should have a rounded side before and/or after. -- 
> Terje
>

This does get the right continuous look for the tab bar, but the text 
and tab bar still don't align. See attached capture (after I also put 
the #$kHIThemeOrientationInverted back). I tried it on two different 
computers, both running 10.5.4, and I got the same result. So something 
is different in 10.5. Maybe it needs different origins for text and tab 
rectangles?

Octav
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-mpv4.tiff
Type: image/tiff
Size: 19382 bytes
Desc: not available
URL: <http://clozure.com/pipermail/info-mcl/attachments/20080907/264a8b34/attachment.tiff>


More information about the info-mcl mailing list