1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

fix icon alignment in inspector tabs

This commit is contained in:
Mitchell Livingston 2011-01-30 21:34:46 +00:00
parent 985f1fd485
commit ccc75eecc7

View file

@ -91,8 +91,8 @@
{
const NSSize iconSize = [fIcon size];
const NSRect iconRect = NSMakeRect(floor((NSWidth(tabRect) - iconSize.width) * 0.5),
floor((NSHeight(tabRect) - iconSize.height) * 0.5),
const NSRect iconRect = NSMakeRect(NSMinX(tabRect) + floor((NSWidth(tabRect) - iconSize.width) * 0.5),
NSMinY(tabRect) + floor((NSHeight(tabRect) - iconSize.height) * 0.5),
iconSize.width, iconSize.height);
[fIcon drawInRect: iconRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];