Skip to content

Commit e759974

Browse files
ACI0104990 integration in 20.x
1 parent d0506b1 commit e759974

File tree

7 files changed

+42
-12
lines changed

7 files changed

+42
-12
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
2-
C_LONGINT:C283($fontSize)
3-
4-
If (oForm.fontSize<=0) // check <=0 (must be >=1)
1+
If (oForm.fontSize<1) // check < 1 (must be >=1)
52
oForm.fontSize:=1
63
End if
7-
$fontSize:=oForm.fontSize
84

9-
WP_SetFontSize(Form:C1466.selection; $fontSize)
5+
WP_SetFontSize(Form:C1466.selection; oForm.fontSize)
106

11-
//(OBJECT Get pointer(Object named;"fontSizeRuler"))->:=Self-> // report value into ruler
7+
UI_PaletteFonts // ACI0104990 Pat Bensky
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
If (oForm.comboFontSizes.currentValue<1) // check < 1 (must be >=1)
2+
oForm.comboFontSizes.currentValue:=1
3+
End if
14

25
WP_SetFontSize(Form:C1466.selection; oForm.comboFontSizes.currentValue)
6+
37
WP_BackToArea
8+
9+
UI_Toolbar // ACI0104990 Pat Bensky

Project/Sources/Methods/UI_PaletteFonts.4dm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,13 @@ Else
3737
OBJECT SET ENTERABLE:C238(*; "LinethroughColor"; False:C215)
3838

3939
End if
40+
41+
// ACI0104990 Pat Bensky
42+
Case of
43+
: (oForm.fontSize=Int:C8(oForm.fontSize))
44+
OBJECT SET FORMAT:C236(*; "fontSizeInput"; "###0;-###0;0")
45+
: ((oForm.fontSize*10)=Int:C8(oForm.fontSize*10))
46+
OBJECT SET FORMAT:C236(*; "fontSizeInput"; "###0.0;-###0.0;0")
47+
Else
48+
OBJECT SET FORMAT:C236(*; "fontSizeInput"; "###0.00;-###0.0;00")
49+
End case

Project/Sources/Methods/UI_Toolbar.4dm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ If (Form:C1466#Null:C1517) //;"The variable associated to the toolbar should be
4848
UI_PaletteFindAndReplace //ACI0103628 - see method too
4949

5050
Else
51+
If ($page=1)
52+
// ACI0104990 Pat Bensky
53+
Case of
54+
: (oForm.fontSize=Int:C8(oForm.fontSize))
55+
OBJECT SET FORMAT:C236(*; "cbox_FontSize"; "###0;-###0;0")
56+
: ((oForm.fontSize*10)=Int:C8(oForm.fontSize*10))
57+
OBJECT SET FORMAT:C236(*; "cbox_FontSize"; "###0.0;-###0.0;0")
58+
Else
59+
OBJECT SET FORMAT:C236(*; "cbox_FontSize"; "###0.00;-###0.0;00")
60+
End case
61+
End if
62+
5163
// general cases after
5264
If ($page=1) || ($page=11) // both pages have enterable areas
5365
$protected:=UI_isProtected(False:C215) // 2022 oct 13 (TEST) don't manage focus on page 1 because fontSize is focusable

Project/Sources/Methods/WP_GetFontInfo.4dm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ C_BOOLEAN:C305($redraw)
1212

1313
C_LONGINT:C283($p)
1414
C_LONGINT:C283($frameColor)
15-
C_LONGINT:C283($fontSize; $color)
15+
C_LONGINT:C283($color)
16+
1617
C_LONGINT:C283($rangeStart; $rangeEnd)
1718

1819
C_TEXT:C284($fontFamily)
1920
C_TEXT:C284($font)
2021

22+
var $fontSize : Real // ACI0104990 Pat Bensky
23+
2124
If (Count parameters:C259<2)
2225
$check:=False:C215
2326
End if
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
//%attributes = {"invisible":true}
2-
#DECLARE($range : Object; $size : Integer)
2+
#DECLARE($range : Object; $size : Real) // ACI0104990 Pat Bensky
33

44
If (Not:C34(OB Is empty:C1297($range))) && ($range.type#2)
5+
If ($size<1) // interface should not allow this, just in case…
6+
$size:=1
7+
End if
58
// set the size (always in pt)
69
//WP RESET ATTRIBUTES($range;wk style sheet) //†††
710
WP SET ATTRIBUTES:C1342($range; wk font size:K81:66; $size)
8-
End if
9-
11+
oForm.fontSize:=$size
12+
End if

Project/Sources/catalog.4DCatalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<table_ref uuid="FCDC2942AAC24F1C8E119520A0C6B44B" name="SAMPLE"/>
3131
</field_ref>
3232
</index>
33-
<base_extra package_name="4D WritePro Interface" structure_file_name="4D WritePro Interface" data_file_path=":4D WritePro Interface.4DD">
33+
<base_extra package_name="4D WritePro Interface" structure_file_name="4D WritePro Interface" data_file_path=":4D WritePro Interface.4DD" __stringCompHash="icu:73.2.0" __keywordBuildingHash="icu:73.2.0">
3434
<journal_file journal_file_enabled="false"/>
3535
</base_extra>
3636
</base>

0 commit comments

Comments
 (0)