[Adium-devl] Further Tab Sizing Issues
David Smith
catfish.man at gmail.com
Sat Aug 25 16:07:02 UTC 2007
On Aug 25, 2007, at 9:02 AM, Evan Schoenberg wrote:
> Quoting David Smith <catfish.man at gmail.com>:
>
>> Someone on irc pointed out that label alignment still looks off when
>> using certain status icon packs. I believe I've tracked it down to an
>> incomplete fix from earlier. As it stands now, the code does this:
>>
>> resultWidth += MAX([_closeButton size].width, NSWidth([self
>> iconRectForTabCell:cell])) + Adium_CellPadding;
>>
>> For icons smaller than the close button, this results in something
>> like this:
>>
>> [padding] [whitespace] [icon] [whitespace] [label] [padding]
>>
>> Naturally that leads to the label looking pushed to the right. I
>> propose that for icons smaller than the close button, we instead add
>> (close button width - icon width) / 2 to the padding. This will keep
>> things balanced looking, at the slight cost of a few extra pixels of
>> padding. Thoughts?
>
> I don't quite understand. Do you mean do:
> resultwidth += (close button width - icon width)/2 +
> Adium_CellPadding
> ?
>
> -Evan
I'm suggesting that we turn this:
[padding] [whitespace] [icon] [whitespace] [label] [padding]
into
[padding] [whitespace] [icon] [whitespace] [label] [whitespace]
[padding]
where 'whitespace' is equal to half the difference in sizes between
the close button and the icon (half due to the icon being centered in
the rect).
David
More information about the devel
mailing list