1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

Much nicer pushed image for turtle button.

This commit is contained in:
Mitchell Livingston 2006-07-19 02:50:07 +00:00
parent 853554c9e5
commit e33b7f3bfa
8 changed files with 41 additions and 29 deletions

View file

@ -93,6 +93,9 @@
A2305AAD0A3DCCEF00AB2D77 /* ProgressBarEndGray.png in Resources */ = {isa = PBXBuildFile; fileRef = A2305AA80A3DCCEF00AB2D77 /* ProgressBarEndGray.png */; };
A24600400A6DB58600D19088 /* RevealCircleButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = A246003E0A6DB58600D19088 /* RevealCircleButtonPressed.png */; };
A24600410A6DB58600D19088 /* RevealCircleButton.png in Resources */ = {isa = PBXBuildFile; fileRef = A246003F0A6DB58600D19088 /* RevealCircleButton.png */; };
A246004D0A6DCE4600D19088 /* SpeedLimitButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */; };
A24600510A6DCE6600D19088 /* SpeedLimitButtonBlue.png in Resources */ = {isa = PBXBuildFile; fileRef = A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */; };
A24600520A6DCE6600D19088 /* SpeedLimitButtonGraphite.png in Resources */ = {isa = PBXBuildFile; fileRef = A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */; };
A24F19080A3A790800C9C145 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
A253F6F30A698970008EE24F /* FilterBarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = A253F6F20A698970008EE24F /* FilterBarBackground.png */; };
@ -112,8 +115,6 @@
A261F1DC0A69A1610002815A /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; };
A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; };
A26D450B0A0503AC00A10BB3 /* peermessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1838A309DEC0430047D688 /* peermessages.h */; };
A26E6A190A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */; };
A26E6A1A0A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */; };
A27431DB0A68538400FA780A /* BarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A27431D90A68538400FA780A /* BarButton.m */; };
A27A53570A06A76400E1F16F /* StatusSep.png in Resources */ = {isa = PBXBuildFile; fileRef = A27A53560A06A76400E1F16F /* StatusSep.png */; };
A27A53660A06AEDB00E1F16F /* StatusBorder.png in Resources */ = {isa = PBXBuildFile; fileRef = A27A53650A06AEDB00E1F16F /* StatusBorder.png */; };
@ -297,6 +298,9 @@
A2305AA80A3DCCEF00AB2D77 /* ProgressBarEndGray.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ProgressBarEndGray.png; path = macosx/Images/ProgressBarEndGray.png; sourceTree = "<group>"; };
A246003E0A6DB58600D19088 /* RevealCircleButtonPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RevealCircleButtonPressed.png; path = macosx/Images/RevealCircleButtonPressed.png; sourceTree = "<group>"; };
A246003F0A6DB58600D19088 /* RevealCircleButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RevealCircleButton.png; path = macosx/Images/RevealCircleButton.png; sourceTree = "<group>"; };
A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressed.png; path = macosx/Images/SpeedLimitButtonPressed.png; sourceTree = "<group>"; };
A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonBlue.png; path = macosx/Images/SpeedLimitButtonBlue.png; sourceTree = "<group>"; };
A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonGraphite.png; path = macosx/Images/SpeedLimitButtonGraphite.png; sourceTree = "<group>"; };
A24F19070A3A790800C9C145 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = macosx/Sparkle.framework; sourceTree = "<group>"; };
A253F6F20A698970008EE24F /* FilterBarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FilterBarBackground.png; path = macosx/Images/FilterBarBackground.png; sourceTree = "<group>"; };
A253F7080A6990EB008EE24F /* FilterButtonOverMain.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FilterButtonOverMain.png; path = macosx/Images/FilterButtonOverMain.png; sourceTree = "<group>"; };
@ -311,8 +315,6 @@
A25FCDDD0A37695F002BCBBE /* PauseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseSelected.png; path = macosx/Images/PauseSelected.png; sourceTree = "<group>"; };
A25FCDDE0A37695F002BCBBE /* ResumeSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeSelected.png; path = macosx/Images/ResumeSelected.png; sourceTree = "<group>"; };
A261F1DB0A69A1610002815A /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = macosx/Growl.framework; sourceTree = "<group>"; };
A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressedBlue.png; path = macosx/Images/SpeedLimitButtonPressedBlue.png; sourceTree = "<group>"; };
A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressedGraphite.png; path = macosx/Images/SpeedLimitButtonPressedGraphite.png; sourceTree = "<group>"; };
A27431D80A68538400FA780A /* BarButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BarButton.h; path = macosx/BarButton.h; sourceTree = "<group>"; };
A27431D90A68538400FA780A /* BarButton.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = BarButton.m; path = macosx/BarButton.m; sourceTree = "<group>"; };
A27A53420A06A62500E1F16F /* StatusSep.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StatusSep.png; path = macosx/Images/StatusSep.png; sourceTree = "<group>"; };
@ -475,9 +477,10 @@
A289EB0B0A33C56D00B082A3 /* ButtonBorder.png */,
A28DBADB0A33C1D800F4B4A7 /* ActionButton.png */,
A2173E1B0A33C1B300B0D8AB /* ActionButtonPressed.png */,
A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */,
A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */,
A2F6DB070A55F31C0058D1E5 /* SpeedLimitButton.png */,
A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */,
A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */,
A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */,
A27A53560A06A76400E1F16F /* StatusSep.png */,
A27A53650A06AEDB00E1F16F /* StatusBorder.png */,
A27ABC890A6B317D0020EC71 /* CloseCircleButton.png */,
@ -757,12 +760,13 @@
A253F72A0A699373008EE24F /* FilterButtonSelectedLeft.png in Resources */,
A253F72B0A699373008EE24F /* FilterButtonSelectedMain.png in Resources */,
A253F72C0A699373008EE24F /* FilterButtonSelectedRight.png in Resources */,
A26E6A190A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png in Resources */,
A26E6A1A0A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png in Resources */,
A27ABC8B0A6B317D0020EC71 /* CloseCircleButton.png in Resources */,
A27ABC8C0A6B317D0020EC71 /* CloseCircleButtonPressed.png in Resources */,
A24600400A6DB58600D19088 /* RevealCircleButtonPressed.png in Resources */,
A24600410A6DB58600D19088 /* RevealCircleButton.png in Resources */,
A246004D0A6DCE4600D19088 /* SpeedLimitButtonPressed.png in Resources */,
A24600510A6DCE6600D19088 /* SpeedLimitButtonBlue.png in Resources */,
A24600520A6DCE6600D19088 /* SpeedLimitButtonGraphite.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -54,6 +54,8 @@
IBOutlet NSMenuItem * fAdvancedBarItem, * fSmallViewItem,
* fSpeedLimitItem, * fSpeedLimitDockItem;
IBOutlet NSButton * fActionButton, * fSpeedLimitButton;
BOOL fSpeedLimitEnabled;
NSImage * fSpeedLimitNormalImage, * fSpeedLimitBlueImage, * fSpeedLimitGraphiteImage;
IBOutlet ImageBackgroundView * fStatusBar;
BOOL fStatusBarVisible;

View file

@ -169,16 +169,20 @@ static void sleepCallBack(void * controller, io_service_t y,
[self showStatusBar: [fDefaults boolForKey: @"StatusBar"] animate: NO];
//set speed limit
fSpeedLimitNormalImage = [fSpeedLimitButton image];
fSpeedLimitBlueImage = [NSImage imageNamed: @"SpeedLimitButtonBlue.png"];
fSpeedLimitGraphiteImage = [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"];
[self updateControlTint: nil];
if ([fDefaults boolForKey: @"SpeedLimit"])
if ((fSpeedLimitEnabled = [fDefaults boolForKey: @"SpeedLimit"]))
{
[fSpeedLimitItem setState: NSOnState];
[fSpeedLimitDockItem setState: NSOnState];
[fSpeedLimitButton setState: NSOnState];
[fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
}
[[fSpeedLimitButton cell] setHighlightsBy: NSNoCellMask];
[fActionButton setToolTip: @"Shortcuts for changing global settings."];
[fSpeedLimitButton setToolTip: @"Speed Limit overrides the total bandwidth limits with its own limits."];
@ -838,10 +842,9 @@ static void sleepCallBack(void * controller, io_service_t y,
- (void) updateControlTint: (NSNotification *) notification
{
if ([fWindow isKeyWindow])
[fSpeedLimitButton setAlternateImage: [NSColor currentControlTint] == NSBlueControlTint
? [NSImage imageNamed: @"SpeedLimitButtonPressedBlue.png"]
: [NSImage imageNamed: @"SpeedLimitButtonPressedGraphite.png"]];
if (fSpeedLimitEnabled && [fWindow isKeyWindow])
[fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
}
- (void) updateUI: (NSTimer *) t
@ -1108,13 +1111,16 @@ static void sleepCallBack(void * controller, io_service_t y,
- (void) toggleSpeedLimit: (id) sender
{
int state = [fSpeedLimitItem state] ? NSOffState : NSOnState;
fSpeedLimitEnabled = !fSpeedLimitEnabled;
int state = fSpeedLimitEnabled ? NSOnState : NSOffState;
[fSpeedLimitItem setState: state];
[fSpeedLimitDockItem setState: state];
[fSpeedLimitButton setState: state];
[fPrefsController enableSpeedLimit: state];
[fSpeedLimitButton setImage: !fSpeedLimitEnabled ? fSpeedLimitNormalImage
: ([NSColor currentControlTint] == NSBlueControlTint ? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage)];
[fPrefsController enableSpeedLimit: fSpeedLimitEnabled];
}
- (void) setLimitGlobalEnabled: (id) sender
@ -1562,7 +1568,7 @@ static void sleepCallBack(void * controller, io_service_t y,
frame.size.height += heightChange;
frame.origin.y -= heightChange;
fStatusBarVisible = !fStatusBarVisible;
fStatusBarVisible = show;
[self updateUI: nil];
@ -1625,7 +1631,7 @@ static void sleepCallBack(void * controller, io_service_t y,
frame.size.height += heightChange;
frame.origin.y -= heightChange;
fFilterBarVisible = !fFilterBarVisible;
fFilterBarVisible = show;
//set views to not autoresize
unsigned int filterMask = [fFilterBar autoresizingMask];
@ -2083,9 +2089,9 @@ static void sleepCallBack(void * controller, io_service_t y,
[fDownloadFilterButton setForActive];
[fPauseFilterButton setForActive];
[fSpeedLimitButton setAlternateImage: [NSColor currentControlTint] == NSBlueControlTint
? [NSImage imageNamed: @"SpeedLimitButtonPressedBlue.png"]
: [NSImage imageNamed: @"SpeedLimitButtonPressedGraphite.png"]];
if (fSpeedLimitEnabled)
[fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
}
- (void) windowDidResignKey: (NSNotification *) notification
@ -2104,7 +2110,8 @@ static void sleepCallBack(void * controller, io_service_t y,
[fPauseFilterButton setForInactive];
#warning need real inactive image
[fSpeedLimitButton setAlternateImage: [NSImage imageNamed: @"SpeedLimitButton.png"]];
if (fSpeedLimitEnabled)
[fSpeedLimitButton setImage: fSpeedLimitNormalImage];
}
- (void) windowDidResize: (NSNotification *) notification

View file

@ -9,9 +9,9 @@
<key>1041</key>
<string>344 478 208 99 0 0 1152 842 </string>
<key>1480</key>
<string>332 330 420 63 0 0 1152 842 </string>
<string>358 399 420 63 0 0 1152 842 </string>
<key>1603</key>
<string>240 433 477 67 0 0 1152 842 </string>
<string>337 544 477 67 0 0 1152 842 </string>
<key>29</key>
<string>9 780 451 44 0 0 1152 842 </string>
<key>456</key>
@ -32,8 +32,7 @@
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>1603</integer>
<integer>1480</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8J135</string>

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B