Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 9d1d54c

Browse files
authored
refine customprops.behavior for manualHeight
reduce "magic" number, a little clean up
1 parent e6b492d commit 9d1d54c

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
script "com.livecode.pi.customprops.behavior"
22
local sPropSet, sHilitePath
3-
constant kWidgetHeight = 150
43

54
on editorInitialize
65
put empty into sPropSet
@@ -91,9 +90,10 @@ end editorUpdate
9190
constant kControlGap = 5
9291
constant kKeyFieldHeight = 21
9392
constant kLabelFieldHeight = 21
94-
constant kValueFieldHeight = 63
93+
constant kValueFieldHeight = 126
9594
constant kLabelSize = 50
9695
constant kSetButtonsHeight = 30
96+
constant kWidgetHeight = 150
9797

9898
on editorResize
9999
lock screen
@@ -112,12 +112,15 @@ on editorResize
112112
set the lockLoc of group "Set buttons" of me to true
113113
send "groupResize kLabelSize, kControlGap" to group "Set buttons" of me
114114

115+
local tTopGroupHeight
116+
put the bottom of group "background" into tTopGroupHeight
117+
115118
# Use all space not taken by other elements for main array display
116-
local tWidgetHeight, tValueHeight
119+
local tWidgetHeight, tValueHeight
117120
put kWidgetHeight into tWidgetHeight
118-
put max (the height of this card - ( 12 * kControlGap + kLabelFieldHeight \
121+
put max(the height of this card - ( 7 * kControlGap + kLabelFieldHeight \
119122
+ kKeyFieldHeight + kValueFieldHeight + kSetButtonsHeight \
120-
+ tWidgetHeight), kValueFieldHeight) into tValueHeight
123+
+ tWidgetHeight + tTopGroupHeight), 0) into tValueHeight
121124

122125
set the height of widget 1 of me to tWidgetHeight
123126
set the width of widget 1 of me to the width of me

0 commit comments

Comments
 (0)