Make "Tools Configuration" dialog wider when it is needed.

This commit is contained in:
David Capello 2010-08-13 11:31:52 -03:00
parent c006cf0f16
commit d4eae74a53

View File

@ -150,9 +150,12 @@ static void on_current_tool_change()
// Get the required size of the whole window
Size reqSize = window->getPreferredSize();
if (jrect_h(window->rc) != reqSize.h) { // Setup the correct window height
if (jrect_w(window->rc) < reqSize.w ||
jrect_h(window->rc) != reqSize.h) {
JRect rect = jrect_new(window->rc->x1, window->rc->y1,
window->rc->x2, window->rc->y1 + reqSize.h);
(jrect_w(window->rc) < reqSize.w) ? window->rc->x1 + reqSize.w:
window->rc->x2,
window->rc->y1 + reqSize.h);
// Show the expanded area inside the screen
if (rect->y2 > JI_SCREEN_H)