2008-05-12 11:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* source/rtl/scrollbr.prg
     ! Fixed :Update(). Submitted by Edmer.
     ! Fixed formula in :CalcThumbPos(). Reported by Edmer.
     ! Fixed assigment in :CalcThumbPos() to not interfere 
       with ::lOverride. Reported by Edmer.
     ; Please test.
This commit is contained in:
Viktor Szakats
2008-05-12 09:56:33 +00:00
parent 778ec89276
commit 636bc4aae1
2 changed files with 17 additions and 9 deletions

View File

@@ -8,6 +8,14 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-05-12 11:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/scrollbr.prg
! Fixed :Update(). Submitted by Edmer.
! Fixed formula in :CalcThumbPos(). Reported by Edmer.
! Fixed assigment in :CalcThumbPos() to not interfere
with ::lOverride. Reported by Edmer.
; Please test.
2008-05-12 18:20 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddads/ads1.c
+ Added DBOI_SKIPUNIQUE (C5.3 ordSkipUnique()) implementation

View File

@@ -178,7 +178,7 @@ METHOD update() CLASS SCROLLBAR
LOCAL nOldCol
LOCAL lOldMCur
LOCAL nThumbPos
LOCAL nThumbPos := ::nThumbPos
IF ISBLOCK( ::bSBlock )
Eval( ::bSBlock )
@@ -186,22 +186,22 @@ METHOD update() CLASS SCROLLBAR
IF ::CalcThumbPos() .AND. nThumbPos != ::nThumbPos
nOldRow := Row()
nOldCol := Col()
nOldRow := Row()
nOldCol := Col()
lOldMCur := MSetCursor( .F. )
DispBegin()
nThumbPos := ::nThumbPos
IF ::nOrient == SCROLL_VERTICAL
DispOutAt( ::nStart + nThumbPos, ::nOffSet, SubStr( ::cStyle, 2, 1 ), hb_ColorIndex( ::cColorSpec, 0 ) )
DispOutAt( ::nStart + nThumbPos, ::nOffset, SubStr( ::cStyle, 3, 1 ), hb_ColorIndex( ::cColorSpec, 1 ) )
DispOutAt( ::nStart + nThumbPos, ::nOffSet, SubStr( ::cStyle, 2, 1), hb_ColorIndex( ::cColorSpec, 0 ) )
DispOutAt( ::nStart + ::nThumbPos, ::nOffset, SubStr( ::cStyle, 3, 1 ), hb_ColorIndex( ::cColorSpec, 1 ) )
ELSE
DispOutAt( ::nOffset, ::nStart + nThumbPos, SubStr( ::cStyle, 2, 1 ), hb_ColorIndex( ::cColorSpec, 0 ) )
DispOutAt( ::nOffset, ::nStart + nThumbPos, SubStr( ::cStyle, 3, 1 ), hb_ColorIndex( ::cColorSpec, 1 ) )
DispOutAt( ::nOffset, ::nStart + ::nThumbPos, SubStr( ::cStyle, 3, 1 ), hb_ColorIndex( ::cColorSpec, 1 ) )
ENDIF
nThumbPos := ::nThumbPos
DispEnd()
MSetCursor( lOldMCur )
@@ -411,7 +411,7 @@ METHOD CalcThumbPos() CLASS SCROLLBAR
ENDIF
IF !::lOverride
::ThumbPos := Min( Max( Round( ( ( nBarLength - 1 ) * ::nCurrent + nTotal - 2 * nBarLength + 1 ) / ( nTotal - nBarLength ), 0 ), 1 ), nBarLength )
::nThumbPos := Min( Max( Round( ::nCurrent * ( ( nBarLength - 1 ) / nTotal ) + 1, 0 ), 1 ), nBarLength )
ENDIF
RETURN .T.