forked from aniani/vim
updated for version 7.4b.018
Problem: Win32: Dialog can still be too big. Solution: Move the check for height further down. (Andrei Olsen)
This commit is contained in:
parent
d82db6046c
commit
a95d823554
@ -3184,9 +3184,8 @@ gui_mch_dialog(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Use our own window's client area for the size, unless it's very
|
/* Use our own window for the size, unless it's very small. */
|
||||||
* small. */
|
GetWindowRect(s_hwnd, &rect);
|
||||||
GetClientRect(s_hwnd, &rect);
|
|
||||||
maxDialogWidth = rect.right - rect.left
|
maxDialogWidth = rect.right - rect.left
|
||||||
- (GetSystemMetrics(SM_CXFRAME) +
|
- (GetSystemMetrics(SM_CXFRAME) +
|
||||||
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
|
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
|
||||||
@ -3195,7 +3194,8 @@ gui_mch_dialog(
|
|||||||
|
|
||||||
maxDialogHeight = rect.bottom - rect.top
|
maxDialogHeight = rect.bottom - rect.top
|
||||||
- (GetSystemMetrics(SM_CYFRAME) +
|
- (GetSystemMetrics(SM_CYFRAME) +
|
||||||
GetSystemMetrics(SM_CXPADDEDBORDER)) * 4;
|
GetSystemMetrics(SM_CXPADDEDBORDER)) * 4
|
||||||
|
- GetSystemMetrics(SM_CYCAPTION);
|
||||||
if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
|
if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
|
||||||
maxDialogHeight = DLG_MIN_MAX_HEIGHT;
|
maxDialogHeight = DLG_MIN_MAX_HEIGHT;
|
||||||
}
|
}
|
||||||
@ -3262,16 +3262,9 @@ gui_mch_dialog(
|
|||||||
|
|
||||||
messageWidth += 10; /* roundoff space */
|
messageWidth += 10; /* roundoff space */
|
||||||
|
|
||||||
/* Restrict the size to a maximum. Causes a scrollbar to show up. */
|
|
||||||
if (msgheight > maxDialogHeight)
|
|
||||||
{
|
|
||||||
msgheight = maxDialogHeight;
|
|
||||||
scroll_flag = WS_VSCROLL;
|
|
||||||
messageWidth += GetSystemMetrics(SM_CXVSCROLL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add width of icon to dlgwidth, and some space */
|
/* Add width of icon to dlgwidth, and some space */
|
||||||
dlgwidth = messageWidth + DLG_ICON_WIDTH + 3 * dlgPaddingX;
|
dlgwidth = messageWidth + DLG_ICON_WIDTH + 3 * dlgPaddingX
|
||||||
|
+ GetSystemMetrics(SM_CXVSCROLL);
|
||||||
|
|
||||||
if (msgheight < DLG_ICON_HEIGHT)
|
if (msgheight < DLG_ICON_HEIGHT)
|
||||||
msgheight = DLG_ICON_HEIGHT;
|
msgheight = DLG_ICON_HEIGHT;
|
||||||
@ -3345,8 +3338,8 @@ gui_mch_dialog(
|
|||||||
|
|
||||||
// Dialog height.
|
// Dialog height.
|
||||||
if (vertical)
|
if (vertical)
|
||||||
dlgheight = msgheight + 2 * dlgPaddingY +
|
dlgheight = msgheight + 2 * dlgPaddingY
|
||||||
DLG_VERT_PADDING_Y + 2 * fontHeight * numButtons;
|
+ DLG_VERT_PADDING_Y + 2 * fontHeight * numButtons;
|
||||||
else
|
else
|
||||||
dlgheight = msgheight + 3 * dlgPaddingY + 2 * fontHeight;
|
dlgheight = msgheight + 3 * dlgPaddingY + 2 * fontHeight;
|
||||||
|
|
||||||
@ -3355,6 +3348,16 @@ gui_mch_dialog(
|
|||||||
if (textfield != NULL)
|
if (textfield != NULL)
|
||||||
dlgheight += editboxheight;
|
dlgheight += editboxheight;
|
||||||
|
|
||||||
|
/* Restrict the size to a maximum. Causes a scrollbar to show up. */
|
||||||
|
if (dlgheight > maxDialogHeight)
|
||||||
|
{
|
||||||
|
msgheight = msgheight - (dlgheight - maxDialogHeight);
|
||||||
|
dlgheight = maxDialogHeight;
|
||||||
|
scroll_flag = WS_VSCROLL;
|
||||||
|
/* Make sure scrollbar doesn't appear in the middle of the dialog */
|
||||||
|
messageWidth = dlgwidth - DLG_ICON_WIDTH - 3 * dlgPaddingX;
|
||||||
|
}
|
||||||
|
|
||||||
add_word(PixelToDialogY(dlgheight));
|
add_word(PixelToDialogY(dlgheight));
|
||||||
|
|
||||||
add_word(0); // Menu
|
add_word(0); // Menu
|
||||||
|
@ -727,6 +727,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
18,
|
||||||
/**/
|
/**/
|
||||||
17,
|
17,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user