Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 22818:7b21c5b208fb
Do not let the height of the entry get larger than half the conversation
window, irrespective of the preferred minimum height.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 05 May 2008 00:00:25 +0000 |
parents | 958f9379eb1a |
children | f28047b68678 ac567757d236 1dd0e007514d |
comparison
equal
deleted
inserted
replaced
22817:b77d000b738b | 22818:7b21c5b208fb |
---|---|
4484 | 4484 |
4485 /* Make sure there's enough room for at least min_lines. Allocate enough space to | 4485 /* Make sure there's enough room for at least min_lines. Allocate enough space to |
4486 * prevent scrolling when the second line is a continuation of the first line, or | 4486 * prevent scrolling when the second line is a continuation of the first line, or |
4487 * is the beginning of a new paragraph. */ | 4487 * is the beginning of a new paragraph. */ |
4488 min_height = min_lines * (oneline.height + MAX(pad_inside, pad_top + pad_bottom)); | 4488 min_height = min_lines * (oneline.height + MAX(pad_inside, pad_top + pad_bottom)); |
4489 height = CLAMP(height, min_height, max_height); | 4489 height = CLAMP(height, MIN(min_height, max_height), max_height); |
4490 | 4490 |
4491 diff = height - gtkconv->entry->allocation.height; | 4491 diff = height - gtkconv->entry->allocation.height; |
4492 if (ABS(diff) < oneline.height / 2) | 4492 if (ABS(diff) < oneline.height / 2) |
4493 return FALSE; | 4493 return FALSE; |
4494 | 4494 |