The windows page break and paragraph dialogs use some label followed by a line extending near the edge of the dialog. When theses labels get localized, either the space available is not enough or there is some blank space between the text end and the line beginning.
This patch add a new kind of window control who adapt the length of the line to compensate for space used by the text. I tested the patch on Windows 95 and Windows NT. Please commit Gilles Saint-Denis
? abi/src/af/gr/win/gr_Win32LabelledSeparator.h
? abi/src/af/gr/win/gr_Win32LabelledSeparator.cpp
Index: abi/src/af/gr/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/gr/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- abi/src/af/gr/Makefile 2001/10/25 22:43:46 1.17
+++ abi/src/af/gr/Makefile 2002/01/26 01:41:17
@@ -30,7 +30,8 @@
$(OBJDIR)/gr_$(ABI_FE)Image.$(OBJ_SUFFIX)
ifeq ($(ABI_FE), Win32)
-PLATFORM_OBJS += $(OBJDIR)/gr_$(ABI_FE)CharWidths.$(OBJ_SUFFIX)
+PLATFORM_OBJS += $(OBJDIR)/gr_$(ABI_FE)CharWidths.$(OBJ_SUFFIX) \
+ $(OBJDIR)/gr_$(ABI_FE)LabelledSeparator.$(OBJ_SUFFIX)
endif
ifeq ($(ABI_FE), Mac)
PLATFORM_OBJS += $(OBJDIR)/gr_$(ABI_FE)Font.$(OBJ_SUFFIX)
Index: abi/src/af/gr/win/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/gr/win/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- abi/src/af/gr/win/Makefile 1999/10/14 16:16:14 1.11
+++ abi/src/af/gr/win/Makefile 2002/01/26 01:41:17
@@ -24,7 +24,8 @@
CPPSRCS= gr_Win32CharWidths.cpp \
gr_Win32Graphics.cpp \
- gr_Win32Image.cpp
+ gr_Win32Image.cpp \
+ gr_Win32LabelledSeparator.cpp
TARGETS= $(OBJS)
INCLUDES= -I$(ABI_XX_ROOT)/../libpng \
Index: abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp,v
retrieving revision 1.4
diff -u -r1.4 ap_Win32Dialog_Break.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp 1999/05/01 08:46:03 1.4
+++ abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp 2002/01/26 01:41:32
@@ -32,6 +32,8 @@
#include "ap_Dialog_Break.h"
#include "ap_Win32Dialog_Break.h"
+#include "gr_Win32LabelledSeparator.h"
+
#include "ap_Win32Resources.rc2"
/*****************************************************************/
@@ -60,6 +62,8 @@
// raise the dialog
XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);
XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+ GR_Win32LabelledSeparator_RegisterClass(pWin32App);
LPCTSTR lpTemplate = NULL;
Index: abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp,v
retrieving revision 1.17
diff -u -r1.17 ap_Win32Dialog_Paragraph.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp 2001/03/19 03:52:20 1.17
+++ abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp 2002/01/26 01:41:35
@@ -36,6 +36,7 @@
#include "xap_Win32PreviewWidget.h"
#include "gr_Win32Graphics.h"
+#include "gr_Win32LabelledSeparator.h"
#include "ap_Win32Resources.rc2"
@@ -106,6 +107,8 @@
// raise the dialog
XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);
XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+ GR_Win32LabelledSeparator_RegisterClass(pWin32App);
LPCTSTR lpTemplate = NULL;
Index: abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2,v
retrieving revision 1.2
diff -u -r1.2 ap_Win32Res_DlgBreak.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2 2001/10/21 20:19:39 1.2
+++ abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2 2002/01/26 01:41:36
@@ -48,8 +48,8 @@
CAPTION "Break"
FONT 8, "MS Sans Serif"
BEGIN
- CONTROL "",
AP_RID_DIALOG_BREAK_LINE, "Static",SS_ETCHEDHORZ,7,11,150,1
- LTEXT "Insert ",
AP_RID_DIALOG_BREAK_TEXT_INSERT,7,7,24,8
+ CONTROL "Insert", AP_RID_DIALOG_BREAK_TEXT_INSERT,
+
+"AbiLabelledSeparator",0x0,7,7,150,8
CONTROL "&Page break", AP_RID_DIALOG_BREAK_RADIO_PAGE,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,15,19,62,10
CONTROL "&Column break", AP_RID_DIALOG_BREAK_RADIO_COL,
@@ -62,8 +62,8 @@
"Button",BS_AUTORADIOBUTTON, 86,48,67,10
CONTROL "&Odd page", AP_RID_DIALOG_BREAK_RADIO_ODD,
"Button",BS_AUTORADIOBUTTON, 86,62,67,10
- CONTROL "",
AP_RID_DIALOG_BREAK_LINE, "Static",SS_ETCHEDHORZ,7,39,150,1
- LTEXT "Section breaks ",
AP_RID_DIALOG_BREAK_TEXT_SECTION,7,35,54,8
+ CONTROL "Section breaks ", AP_RID_DIALOG_BREAK_TEXT_SECTION,
+
+"AbiLabelledSeparator",0x0,7,35,150,8
CONTROL "",
AP_RID_DIALOG_BREAK_LINE, "Static",SS_ETCHEDHORZ,7,78,150,1
DEFPUSHBUTTON "OK", AP_RID_DIALOG_BREAK_BTN_OK,
53,87,50,14
PUSHBUTTON "Cancel", AP_RID_DIALOG_BREAK_BTN_CANCEL,
107,87,50,14
Index: abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2,v
retrieving revision 1.8
diff -u -r1.8 ap_Win32Res_DlgParagraph.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2 2002/01/01 23:08:56 1.8
+++ abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2 2002/01/26 01:41:37
@@ -110,8 +110,8 @@
LTEXT "&Outline level:", AP_RID_DIALOG_PARA_TEXT_LEVEL, 141,6,43,8,NOT
WS_VISIBLE
COMBOBOX
AP_RID_DIALOG_PARA_COMBO_LEVEL, 198,4,52,97,
CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- CONTROL "",
AP_RID_DIALOG_PARA_LINE, "Static",SS_ETCHEDHORZ,2,27,256,1
- LTEXT "Indentation", AP_RID_DIALOG_PARA_TEXT_INDENT,
2,23,40,8
+ CONTROL "Indentation", AP_RID_DIALOG_PARA_TEXT_INDENT,
+
+"AbiLabelledSeparator", 0x0, 2,23,256,8
LTEXT "&Left:", AP_RID_DIALOG_PARA_TEXT_LEFT,
12,38,40,8
EDITTEXT
AP_RID_DIALOG_PARA_EDIT_LEFT, 54,36,52,12,ES_AUTOHSCROLL
CONTROL "Spin1", AP_RID_DIALOG_PARA_SPIN_LEFT,
@@ -130,8 +130,8 @@
CONTROL "Spin1", AP_RID_DIALOG_PARA_SPIN_BY,
"msctls_updown32",
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,232,36,11,14
- CONTROL "",
AP_RID_DIALOG_PARA_LINE, "Static",SS_ETCHEDHORZ,2,83,256,1
- LTEXT "Spacing",
AP_RID_DIALOG_PARA_TEXT_SPACING,2,79,31,8
+ CONTROL "Spacing", AP_RID_DIALOG_PARA_TEXT_SPACING,
+
+"AbiLabelledSeparator", 0x0, 2,79,256,8
LTEXT "&Before:",
AP_RID_DIALOG_PARA_TEXT_BEFORE, 12,95,40,8
EDITTEXT
AP_RID_DIALOG_PARA_EDIT_BEFORE, 54,93,52,12,ES_AUTOHSCROLL
CONTROL "Spin1", AP_RID_DIALOG_PARA_SPIN_BEFORE,
@@ -150,8 +150,8 @@
CONTROL "Spin1", AP_RID_DIALOG_PARA_SPIN_AT,
"msctls_updown32",
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,232,93,11,14
- CONTROL "",
AP_RID_DIALOG_PARA_LINE, "Static",SS_ETCHEDHORZ,2,136,256,1
- LTEXT "Preview",
AP_RID_DIALOG_PARA_TEXT_PREVIEW,2,132,30,8
+ CONTROL "Preview", AP_RID_DIALOG_PARA_TEXT_PREVIEW,
+
+"AbiLabelledSeparator", 0x0, 2,132,256,8
CONTROL "(preview)", AP_RID_DIALOG_PARA_PREVIEW,
"Button",BS_OWNERDRAW, 14,145,233,65
END
@@ -160,8 +160,8 @@
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
- CONTROL "",
AP_RID_DIALOG_PARA_LINE, "Static",SS_ETCHEDHORZ,2,10,256,1
- LTEXT "Pagination", AP_RID_DIALOG_PARA_TEXT_PAGE,
2,6,38,8
+ CONTROL "Pagination", AP_RID_DIALOG_PARA_TEXT_PAGE,
+
+"AbiLabelledSeparator", 0x0, 2,6,256,8
CONTROL "&Widow/Orphan control",
AP_RID_DIALOG_PARA_CHECK_WIDOW,
"Button",BS_AUTO3STATE | WS_TABSTOP,14,18,126,10
@@ -181,8 +181,8 @@
CONTROL "&Don't hyphenate",
AP_RID_DIALOG_PARA_CHECK_NOHYPHEN,
"Button",BS_AUTO3STATE | WS_TABSTOP,14,78,126,10
- CONTROL "",
AP_RID_DIALOG_PARA_LINE, "Static",SS_ETCHEDHORZ,2,136,256,1
- LTEXT "Preview",
AP_RID_DIALOG_PARA_TEXT_PREVIEW,2,132,40,8
+ CONTROL "Preview", AP_RID_DIALOG_PARA_TEXT_PREVIEW,
+
+"AbiLabelledSeparator", 0x0, 2,132,256,8
CONTROL "(preview)", AP_RID_DIALOG_PARA_PREVIEW,
"Button",BS_OWNERDRAW, 14,145,233,65
END
gr_Win32LabelledSeparator.cpp
Description: Binary data
gr_Win32LabelledSeparator.h
Description: Binary data
