dorianj / psmtabbarcontrol Goto Github PK
View Code? Open in Web Editor NEWA browser-style Mac OS X tab control that works on 10.6-10.8 with Xcode 4. Pull requests welcomed.
A browser-style Mac OS X tab control that works on 10.6-10.8 with Xcode 4. Pull requests welcomed.
From update R292 in MacCode. http://code.google.com/p/maccode/source/detail?r=292
Sorry for the bad diff
1551 1551 {
1552 1552 NSTabViewItem *item = [sender representedObject];
1553 1553 [sender retain];
1554 - if(([_cells count] == 1) && (![self canCloseOnlyTab]))
1554 + if(([_cells count] == 1) && (![self canCloseOnlyTab])) {
1555 + [sender release];
1555 1556 return;
1557 + }
1556 1558
1557 1559 if ([[self delegate] respondsToSelector:@selector(tabView:shouldCloseTabViewItem:)]) {
1558 1560 if (![[self delegate] tabView:tabView shouldCloseTabViewItem:item]) {
1559 1561 // fix mouse downed close button
1560 1562 [sender setCloseButtonPressed:NO];
1563 + [sender release];
1561 1564 return;
1562 1565 }
1563 1566 }
I pulled down the latest changes and now have a strange problem. My previous pull was Aug 30th.
I have [tabBar setShowAddTabButton:YES]. But with the latest code, the button does not appear until I move the mouse over the area. Then it draws.
Any idea on what might be causing this?
Todd
Hi!
The active tab is hidden when it's clicked in the context menu.
I select an item in the context menu (which is for enumerating the invisible tabs) then the next thing happens:
the tab's content opens, but the tab is still hidden itself!
:)
Indeed, very useful control, thanks!
:)
If a toolbar is added in IB, at least the "Unified" style doesn't work properly.
Something more pill-shaped would be better I think.
Hi,
I have noticed unusual behaviour when the tabView:shouldAllowTabViewItem:toLeaveTabBar: delegate method return NO. My goal is to allow tabs to be dragged within the current tab bar (to allow them to be re-ordered), but to disallow tear-off or dropping onto other tab bars.
I have modified DemoWindowController.m to include the following delegate method:
- (BOOL) tabView:(NSTabView *)aTabView shouldAllowTabViewItem:(NSTabViewItem *)tabViewItem toLeaveTabBar:(PSMTabBarControl *)tabBarControl
{
return NO;
}
With the above change, I am able to successfully drag tabs within the tab bar, but if I attempt to drop outside of the tab bar, the ordering of the tabs seems to get out of sync with the actual tab view. Similarly, the highlighting of the tabs doesn't correspond with the currently selected tab view item in the tab view.
I hope this makes sense. Please feel free to contact me if you require any further information.
This happens with all styles on both Retina and non-Retina but is more obvious to see on Retina. The inner shadow should be at the top.
See http://cl.ly/JHnL for an example of what I mean.
Error Message:
Build settings from command line:
OBJROOT = ../build
SYMROOT = ../build/xcodebuild: error: The directory /Users/whoami/src/PSMTabBarControl/Source does not contain an >Xcode project.
I think that a problem will be solved to modify 'build.sh' like this:
-cd build
-xcodebuild build -configuration Release -target PSMTabBarControlFramework SYMROOT=../build/ OBJROOT=../build
+xcodebuild build -configuration Release -target PSMTabBarControlFramework SYMROOT=./build/ OBJROOT=./build
My Environment:
Xcode 4.5
Mac OS X Lion
Test case:
-- no over flow chevron button --
-- now overflow button appears--
button should appear immediately when needed.
When using Unified style, the button shows up but is overlaid on top of the last tab; resizing the window fixes this.
The active tabs seem to be 1 pixel (so half a pixel on non-Retina) higher than they should be, resulting in the canvas showing through beyond it.
See a zoomed in screenshot here: http://cl.ly/JHUd. The left one is vertical tabs, the right one is horizontal.
The shadows also seem to render really badly, having a gap before the shadows happen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.