Hi frank
when I tried to save a project, Kommiter is invoked and I got calibrateScrollbar "Set the scrollbar parameters to match the texts." | maxY range delta innerH | self fullBounds. maxY := self srcMorph extent y max: self dstMorph extent y. innerH := self dstMorph innerBounds height. delta := 91. "self dstMorph textMorph defaultLineHeight" range := maxY - innerH max: 0. range = 0 ifTrue: [ ^ self scrollbarMorph scrollDelta: 0.02 pageDelta: 0.2; interval: 1.0; setValue: 0.0 ]. self scrollbarMorph scrollDelta: (delta / range) asFloat pageDelta: ((innerH - delta) / range) asFloat; interval: (innerH / maxY) asFloat; setValue: ((self srcMorph scroller offset y max: self dstMorph scroller offset y) / range min: 1.0) asFloat ^^^^^^^ where srcMoirph is a RubScrolledTextMorph Stef |
Right I forgot to call scrollPane on the morph before scroller in this method. I did not see it because I do not use Komitter.
Fixed here: https://pharo.fogbugz.com/f/cases/16088/Fix-DiffMorph-when-called-from-Komitter Franck > Date: Sat, 1 Aug 2015 22:05:15 +0200 > From: [hidden email] > To: [hidden email] > Subject: [Pharo-dev] Using Kommiter I got a problem with diff morph and rubric > > Hi frank > > when I tried to save a project, Kommiter is invoked and I got > > calibrateScrollbar > "Set the scrollbar parameters to match the texts." > > | maxY range delta innerH | > self fullBounds. > maxY := self srcMorph extent y max: self dstMorph extent y. > innerH := self dstMorph innerBounds height. > delta := 91. "self dstMorph textMorph defaultLineHeight" > range := maxY - innerH max: 0. > range = 0 > ifTrue: [ > ^ self scrollbarMorph > scrollDelta: 0.02 pageDelta: 0.2; > interval: 1.0; > setValue: 0.0 ]. > self scrollbarMorph > scrollDelta: (delta / range) asFloat pageDelta: ((innerH - > delta) / range) asFloat; > interval: (innerH / maxY) asFloat; > setValue: > ((self srcMorph scroller offset y max: self dstMorph > scroller offset y) / range min: 1.0) asFloat > > ^^^^^^^ > > where srcMoirph is a RubScrolledTextMorph > > Stef > |
thanks a lot franck.
Le 2/8/15 00:32, Franck Warlouzet a
écrit :
|
Free forum by Nabble | Edit this page |