1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

Add flat variants of status icons for message log

This commit is contained in:
Eitot 2017-01-04 22:47:27 +01:00
parent a035c79da4
commit 290fed53eb
22 changed files with 60 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "PurpleDotFlat.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "PurpleDotFlat@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

View file

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 451 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -2,12 +2,12 @@
"images" : [
{
"idiom" : "mac",
"filename" : "GreenDot.png",
"filename" : "RedDotFlat.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "GreenDot@2x.png",
"filename" : "RedDotFlat@2x.png",
"scale" : "2x"
}
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View file

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 527 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "YellowDotFlat.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "YellowDotFlat@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

View file

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 535 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -46,9 +46,9 @@
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="16">
<items>
<menuItem title="Error" state="on" image="RedDot" id="17"/>
<menuItem title="Info" image="YellowDot" id="18"/>
<menuItem title="Debug" image="PurpleDot" id="19"/>
<menuItem title="Error" state="on" image="RedDotFlat" id="17"/>
<menuItem title="Info" image="YellowDotFlat" id="18"/>
<menuItem title="Debug" image="PurpleDotFlat" id="19"/>
</items>
</menu>
</popUpButtonCell>
@ -311,8 +311,8 @@ HaMdqB23Hbsdwh3KHdcd3B3eHeAd5R3tHfAd9R39HgAeEh4VHhoAAAAAAAACAQAAAAAAAABBAAAAAAAA
AAAAAAAAAAAeHA
</mutableData>
</image>
<image name="PurpleDot" width="16" height="16"/>
<image name="RedDot" width="16" height="16"/>
<image name="YellowDot" width="16" height="16"/>
<image name="PurpleDotFlat" width="16" height="16"/>
<image name="RedDotFlat" width="16" height="16"/>
<image name="YellowDotFlat" width="16" height="16"/>
</resources>
</document>

View file

@ -68,7 +68,13 @@
[[fLevelButton itemAtIndex: LEVEL_ERROR] setTitle: NSLocalizedString(@"Error", "Message window -> level string")];
[[fLevelButton itemAtIndex: LEVEL_INFO] setTitle: NSLocalizedString(@"Info", "Message window -> level string")];
[[fLevelButton itemAtIndex: LEVEL_DEBUG] setTitle: NSLocalizedString(@"Debug", "Message window -> level string")];
if (![NSApp isOnYosemiteOrBetter])
{
[[fLevelButton itemAtIndex: LEVEL_ERROR] setImage: [NSImage imageNamed: @"RedDotGlossy"]];
[[fLevelButton itemAtIndex: LEVEL_INFO] setImage: [NSImage imageNamed: @"YellowDotGlossy"]];
[[fLevelButton itemAtIndex: LEVEL_DEBUG] setImage: [NSImage imageNamed: @"PurpleDotGlossy"]];
}
const CGFloat levelButtonOldWidth = NSWidth([fLevelButton frame]);
[fLevelButton sizeToFit];
@ -267,11 +273,11 @@
switch (level)
{
case TR_LOG_ERROR:
return [NSImage imageNamed: @"RedDot"];
return [NSImage imageNamed: ([NSApp isOnYosemiteOrBetter] ? @"RedDotFlat" : @"RedDotGlossy")];
case TR_LOG_INFO:
return [NSImage imageNamed: @"YellowDot"];
return [NSImage imageNamed: ([NSApp isOnYosemiteOrBetter] ? @"YellowDotFlat" : @"YellowDotGlossy")];
case TR_LOG_DEBUG:
return [NSImage imageNamed: @"PurpleDot"];
return [NSImage imageNamed: ([NSApp isOnYosemiteOrBetter] ? @"PurpleDotFlat" : @"PurpleDotGlossy")];
default:
NSAssert1(NO, @"Unknown message log level: %ld", level);
return nil;