when the toolbar is set to small size, don't make the group items small
This commit is contained in:
parent
b05bf2c368
commit
2441a052b0
|
@ -70,10 +70,11 @@
|
|||
A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */; };
|
||||
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FA40C4D97840034AB1D /* PriorityNone.png */; };
|
||||
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */; };
|
||||
A20BFFB70D091CC700CE5D2B /* ToolbarSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A20BFFB60D091CC700CE5D2B /* ToolbarSegmentedCell.m */; };
|
||||
A21282A80CA6C66800EAEE0F /* StatusBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = A21282A60CA6C66800EAEE0F /* StatusBarView.m */; };
|
||||
A21567ED0A9A5034004DECD6 /* MessageWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = A21567EB0A9A5034004DECD6 /* MessageWindow.nib */; };
|
||||
A215760B0C0D449A0057A26A /* NSBezierPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A21576090C0D449A0057A26A /* NSBezierPathAdditions.m */; };
|
||||
A219798B0D07B78400438EA7 /* ButtonGroupToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */; };
|
||||
A219798B0D07B78400438EA7 /* GroupToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = A219798A0D07B78400438EA7 /* GroupToolbarItem.m */; };
|
||||
A21DFF100A292B2B007C5F76 /* Transfers.png in Resources */ = {isa = PBXBuildFile; fileRef = A21DFF0F0A292B2B007C5F76 /* Transfers.png */; };
|
||||
A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */; };
|
||||
A21F5C040AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5C020AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m */; };
|
||||
|
@ -403,12 +404,14 @@
|
|||
A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityMixed.png; path = macosx/Images/PriorityMixed.png; sourceTree = "<group>"; };
|
||||
A20B6FA40C4D97840034AB1D /* PriorityNone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNone.png; path = macosx/Images/PriorityNone.png; sourceTree = "<group>"; };
|
||||
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNormal.png; path = macosx/Images/PriorityNormal.png; sourceTree = "<group>"; };
|
||||
A20BFFB50D091CC700CE5D2B /* ToolbarSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolbarSegmentedCell.h; path = macosx/ToolbarSegmentedCell.h; sourceTree = "<group>"; };
|
||||
A20BFFB60D091CC700CE5D2B /* ToolbarSegmentedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ToolbarSegmentedCell.m; path = macosx/ToolbarSegmentedCell.m; sourceTree = "<group>"; };
|
||||
A21282A50CA6C66800EAEE0F /* StatusBarView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = StatusBarView.h; path = macosx/StatusBarView.h; sourceTree = "<group>"; };
|
||||
A21282A60CA6C66800EAEE0F /* StatusBarView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = StatusBarView.m; path = macosx/StatusBarView.m; sourceTree = "<group>"; };
|
||||
A21576090C0D449A0057A26A /* NSBezierPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NSBezierPathAdditions.m; path = macosx/NSBezierPathAdditions.m; sourceTree = "<group>"; };
|
||||
A215760A0C0D449A0057A26A /* NSBezierPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NSBezierPathAdditions.h; path = macosx/NSBezierPathAdditions.h; sourceTree = "<group>"; };
|
||||
A21979890D07B78400438EA7 /* ButtonGroupToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonGroupToolbarItem.h; path = macosx/ButtonGroupToolbarItem.h; sourceTree = "<group>"; };
|
||||
A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ButtonGroupToolbarItem.m; path = macosx/ButtonGroupToolbarItem.m; sourceTree = "<group>"; };
|
||||
A21979890D07B78400438EA7 /* GroupToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GroupToolbarItem.h; path = macosx/GroupToolbarItem.h; sourceTree = "<group>"; };
|
||||
A219798A0D07B78400438EA7 /* GroupToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GroupToolbarItem.m; path = macosx/GroupToolbarItem.m; sourceTree = "<group>"; };
|
||||
A21DFF0F0A292B2B007C5F76 /* Transfers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Transfers.png; path = macosx/Images/Transfers.png; sourceTree = "<group>"; };
|
||||
A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionMenuRatioToDisplayRatioTransformer.h; path = macosx/ActionMenuRatioToDisplayRatioTransformer.h; sourceTree = "<group>"; };
|
||||
A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionMenuRatioToDisplayRatioTransformer.m; path = macosx/ActionMenuRatioToDisplayRatioTransformer.m; sourceTree = "<group>"; };
|
||||
|
@ -783,8 +786,10 @@
|
|||
A28E1DD50CFFD8A700E16385 /* BottomBarView.h */,
|
||||
A2C89D5F0CFCBF57004CC2BC /* ButtonToolbarItem.m */,
|
||||
A28E1DDF0CFFD8EC00E16385 /* ButtonToolbarItem.h */,
|
||||
A21979890D07B78400438EA7 /* ButtonGroupToolbarItem.h */,
|
||||
A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */,
|
||||
A21979890D07B78400438EA7 /* GroupToolbarItem.h */,
|
||||
A219798A0D07B78400438EA7 /* GroupToolbarItem.m */,
|
||||
A20BFFB50D091CC700CE5D2B /* ToolbarSegmentedCell.h */,
|
||||
A20BFFB60D091CC700CE5D2B /* ToolbarSegmentedCell.m */,
|
||||
A257C17F0CAD3003004E121C /* PeerTableView.h */,
|
||||
A257C1800CAD3003004E121C /* PeerTableView.m */,
|
||||
A2E23AC30CB5E1930002BB25 /* InfoTabButtonCell.h */,
|
||||
|
@ -1638,7 +1643,8 @@
|
|||
A2C89D600CFCBF57004CC2BC /* ButtonToolbarItem.m in Sources */,
|
||||
A28E1DBA0CFFD41800E16385 /* BottomBarView.m in Sources */,
|
||||
A28E1E160D00574A00E16385 /* ActionPopUpButton.m in Sources */,
|
||||
A219798B0D07B78400438EA7 /* ButtonGroupToolbarItem.m in Sources */,
|
||||
A219798B0D07B78400438EA7 /* GroupToolbarItem.m in Sources */,
|
||||
A20BFFB70D091CC700CE5D2B /* ToolbarSegmentedCell.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
#import "StatsWindowController.h"
|
||||
#import "AboutWindowController.h"
|
||||
#import "ButtonToolbarItem.h"
|
||||
#import "ButtonGroupToolbarItem.h"
|
||||
#import "GroupToolbarItem.h"
|
||||
#import "ToolbarSegmentedCell.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "UKKQueue.h"
|
||||
|
@ -2721,9 +2722,10 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
}
|
||||
else if ([ident isEqualToString: TOOLBAR_PAUSE_RESUME_ALL])
|
||||
{
|
||||
ButtonGroupToolbarItem * groupItem = [[ButtonGroupToolbarItem alloc] initWithItemIdentifier: ident];
|
||||
GroupToolbarItem * groupItem = [[GroupToolbarItem alloc] initWithItemIdentifier: ident];
|
||||
|
||||
NSSegmentedControl * segmentedControl = [[NSSegmentedControl alloc] initWithFrame: NSZeroRect];
|
||||
[segmentedControl setCell: [[ToolbarSegmentedCell alloc] init]];
|
||||
[groupItem setView: segmentedControl];
|
||||
NSSegmentedCell * segmentedCell = (NSSegmentedCell *)[segmentedControl cell];
|
||||
|
||||
|
@ -2760,9 +2762,10 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
}
|
||||
else if ([ident isEqualToString: TOOLBAR_PAUSE_RESUME_SELECTED])
|
||||
{
|
||||
ButtonGroupToolbarItem * groupItem = [[ButtonGroupToolbarItem alloc] initWithItemIdentifier: ident];
|
||||
GroupToolbarItem * groupItem = [[GroupToolbarItem alloc] initWithItemIdentifier: ident];
|
||||
|
||||
NSSegmentedControl * segmentedControl = [[NSSegmentedControl alloc] initWithFrame: NSZeroRect];
|
||||
[segmentedControl setCell: [[ToolbarSegmentedCell alloc] init]];
|
||||
[groupItem setView: segmentedControl];
|
||||
NSSegmentedCell * segmentedCell = (NSSegmentedCell *)[segmentedControl cell];
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ButtonGroupToolbarItem : NSToolbarItem
|
||||
@interface GroupToolbarItem : NSToolbarItem
|
||||
{
|
||||
NSArray * fIdentifiers;
|
||||
}
|
|
@ -22,9 +22,9 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "ButtonGroupToolbarItem.h"
|
||||
#import "GroupToolbarItem.h"
|
||||
|
||||
@implementation ButtonGroupToolbarItem
|
||||
@implementation GroupToolbarItem
|
||||
|
||||
- (void) dealloc
|
||||
{
|
|
@ -0,0 +1,32 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2007 Transmission authors and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface ToolbarSegmentedCell : NSSegmentedCell
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,34 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2007 Transmission authors and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "ToolbarSegmentedCell.h"
|
||||
|
||||
@implementation ToolbarSegmentedCell
|
||||
|
||||
- (NSControlSize) controlSize
|
||||
{
|
||||
return NSRegularControlSize;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue