Skip to content

Commit

Permalink
Add up margins within the #width assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
fmqa committed Aug 22, 2022
1 parent 9a41d33 commit 9f15fe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rubric/RubAbstractTextArea.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ RubAbstractTextArea >> handleEdit: editBlock [
editBlock value.
"Fit to width on edit"
(self grow isNotNil & self grow) ifTrue: [
self width: (1 max: self maxLineWidth)
self width: (1 max: self maxLineWidth + self margins left + self margins right)
].
self selectionChanged "Note new selection"
]
Expand Down Expand Up @@ -1328,7 +1328,7 @@ RubAbstractTextArea >> maxLineWidth [
w := 0.
self string linesDo: [ :line | w := w max: (self font widthOfString: line) ].
"check this later, not really sure about this calculation"
^ w * 6 // 5 + self margins left + self margins right
^ w * 6 // 5
]

{ #category : #accessing }
Expand Down

0 comments on commit 9f15fe2

Please sign in to comment.