2011-04-15 09:59 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbxbp/xbppushbutton.prg
    ! Fixed: :activate was firing event twice, on press and release, both.

  * contrib/hbxbp/xbpwindow.prg
    ! Fixed: to reset window size as per GUI norms. Xbase++ seems 
      wrong on this account where XbpDialog() height is "excluding"
      window frame-height whereas width is "inclusing" frame-width.
This commit is contained in:
Pritpal Bedi
2011-04-15 17:04:37 +00:00
parent 44957ef52d
commit 35e4b9d078
3 changed files with 29 additions and 26 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-04-15 09:59 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/xbppushbutton.prg
! Fixed: :activate was firing event twice, on press and release, both.
* contrib/hbxbp/xbpwindow.prg
! Fixed: to reset window size as per GUI norms. Xbase++ seems
wrong on this account where XbpDialog() height is "excluding"
window frame-height whereas width is "inclusing" frame-width.
2011-04-15 01:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/xbpwindow.prg
! Depricated: setting fore/background colors of a part via

View File

@@ -143,7 +143,7 @@ METHOD XbpPushButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
METHOD XbpPushButton:execSlot( cSlot, p )
DO CASE
CASE cSlot == "clicked()" .OR. cSlot == "pressed()"
CASE cSlot == "clicked()" // .OR. cSlot == "pressed()"
::activate()
CASE cSlot == "keyPressed()"
IF hbxbp_QKeyEventToAppEvent( p ) == xbeK_ENTER
@@ -167,14 +167,12 @@ METHOD XbpPushButton:handleEvent( nEvent, mp1, mp2 )
METHOD XbpPushButton:connect()
::oWidget:connect( "clicked()", {|| ::execSlot( "clicked()" ) } )
::oWidget:connect( "pressed()", {|| ::execSlot( "pressed()" ) } )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpPushButton:disconnect()
::oWidget:disconnect( "clicked()" )
::oWidget:disconnect( "pressed()" )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -1062,6 +1062,24 @@ METHOD XbpWindow:setTrackPointer( lTrack )
/*----------------------------------------------------------------------*/
METHOD XbpWindow:currentPos()
RETURN { ::oWidget:x(), ::oWidget:y() }
/*----------------------------------------------------------------------*/
METHOD XbpWindow:currentSize()
IF ::className() == "HBPAPPDESKTOP"
RETURN { ::width(), ::height() }
ELSE
RETURN { ::oWidget:width(), ::oWidget:height() }
ENDIF
RETURN {}
/*----------------------------------------------------------------------*/
METHOD XbpWindow:setPos( aPos, lPaint )
DEFAULT aPos TO ::aPos
@@ -1076,7 +1094,6 @@ METHOD XbpWindow:setPos( aPos, lPaint )
/*----------------------------------------------------------------------*/
METHOD XbpWindow:setPosAndSize( aPos, aSize, lPaint )
LOCAL oSize, oSizeF
IF empty( ::qtObject )
DEFAULT aPos TO ::aPos
@@ -1085,11 +1102,8 @@ METHOD XbpWindow:setPosAndSize( aPos, aSize, lPaint )
IF hb_isArray( aPos ) .and. hb_isArray( aSize )
DEFAULT lPaint TO .T.
oSize := ::oWidget:size()
oSizeF := ::oWidget:frameSize()
::oWidget:move( aPos[ 1 ], aPos[ 2 ] )
::oWidget:resize( aSize[ 1 ] - ( oSizeF:width()-oSize:width() ), aSize[ 2 ] )
::oWidget:resize( aSize[ 1 ], aSize[ 2 ] )
ENDIF
ENDIF
@@ -1190,24 +1204,6 @@ METHOD XbpWindow:setPresParam( aPPNew )
/*----------------------------------------------------------------------*/
METHOD XbpWindow:currentPos()
RETURN { ::oWidget:x(), ::oWidget:y() }
/*----------------------------------------------------------------------*/
METHOD XbpWindow:currentSize()
IF ::className() == "HBPAPPDESKTOP"
RETURN { ::width(), ::height() }
ELSE
RETURN { ::oWidget:frameGeometry():width(), ::oWidget:frameGeometry():height() }
ENDIF
RETURN {}
/*----------------------------------------------------------------------*/
METHOD XbpWindow:getHWND()
LOCAL oError := ErrorNew()