From a1c89f7f3bfecc384dc55a6bc980216d475eaa46 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Wed, 30 Dec 2009 18:40:51 +0000 Subject: [PATCH] 2009-12-30 10:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbxbp/xbpmenubar.prg ! Removed default style-sheet application which has to be done at .prg level with oXbp:setStyleSheet(). * contrib/hbxbp/xbptoolbar.prg ! Fix to adjust toolbar button size with :imageHeight and :imageWidth. --- harbour/ChangeLog | 8 ++++++++ harbour/contrib/hbxbp/xbpmenubar.prg | 3 --- harbour/contrib/hbxbp/xbptoolbar.prg | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 296dbef995..ba7e05370f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-30 10:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbxbp/xbpmenubar.prg + ! Removed default style-sheet application which has to be + done at .prg level with oXbp:setStyleSheet(). + + * contrib/hbxbp/xbptoolbar.prg + ! Fix to adjust toolbar button size with :imageHeight and :imageWidth. + 2009-12-29 14:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapi.h * harbour/src/common/hbprintf.c diff --git a/harbour/contrib/hbxbp/xbpmenubar.prg b/harbour/contrib/hbxbp/xbpmenubar.prg index 7d91253960..5ccbdd4073 100644 --- a/harbour/contrib/hbxbp/xbpmenubar.prg +++ b/harbour/contrib/hbxbp/xbpmenubar.prg @@ -196,8 +196,6 @@ METHOD xbpMenuBar:create( oParent, aPresParams, lVisible ) ::oParent:oMenu := Self endif - ::setStyle() - ::oParent:addChild( self ) RETURN Self @@ -735,7 +733,6 @@ METHOD xbpMenu:create( oParent, aPresParams, lVisible ) ::oWidget := QMenu():new( ::pParent ) ::oParent:oWidget:addMenu( ::pWidget ) - ::setStyle() ::oParent:addChild( self ) RETURN Self diff --git a/harbour/contrib/hbxbp/xbptoolbar.prg b/harbour/contrib/hbxbp/xbptoolbar.prg index 59ce1d7801..ffbe81e243 100644 --- a/harbour/contrib/hbxbp/xbptoolbar.prg +++ b/harbour/contrib/hbxbp/xbptoolbar.prg @@ -153,6 +153,10 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ::oWidget := QToolBar():new( oPar:oWidget ) oPar:oWidget:addToolBar_1( ::pWidget ) + IF ::imageWidth > 0 .and. ::imageHeight > 0 + ::oWidget:setIconSize( QSize():new( ::imageWidth, ::imageHeight ) ) + ENDIF + #if 0 /* Assign attributes */ IF ::style == XBPTOOLBAR_STYLE_FLAT @@ -269,7 +273,7 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS ENDIF /* Attach codeblock to be triggered */ - ::Connect( oBtn:oAction:pPtr, "triggered(bool)", {|| ::exeBlock( oBtn ) } ) + ::Connect( oBtn:oAction, "triggered(bool)", {|| ::exeBlock( oBtn ) } ) /* Attach Action with Toolbar */ ::oWidget:addAction( oBtn:oAction )