[ wxwindows-Patches-1469227 ] wxUniv patch for toolbar button

SourceForge.net noreply at sourceforge.net
Sun Apr 1 08:05:50 PDT 2007


Patches item #1469227, was opened at 2006-04-12 14:39
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1469227&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxUniv
Group: bug fix
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Danny Raynor (draynor)
Assigned to: Włodzimierz Skiba (abxabx)
Summary: wxUniv patch for toolbar button

Initial Comment:
wxUniv toolbar fix some issue for toolbar button remain 
in pressed status, however, in some cases still have 
this issue.

If want to reproduce this issue, could use samples/
toolbar to observe this issue.

I add a short code to fix this issue. Since OnDraw() 
function is use the two flags to determine how to draw 
the toolbar button, a quick fix solution is to set two 
flags to false.

modified file: src/univ/toolbar.cpp

----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-04-01 17:05

Message:
Logged In: YES 
user_id=71618
Originator: NO

Thanks, second patch applied too (slightly modified).

----------------------------------------------------------------------

Comment By: Danny Raynor (draynor)
Date: 2006-06-05 15:26

Message:
Logged In: YES 
user_id=1371003

For first patch, it would solve some problems but would let
toolbar status have more troubles. It is my mistakes, sorry.
I let the code too complex. I send second patch to fix some
problems and it works correctly.

I think it is not difficult to solve this issue (in these
days try to write better solution), we need to prevent
release our toolbar button again in PerformAction() function
when action equals wxACTION_TOOLBAR_RELEASE.

After we handle RELEASE event ok, wxACTION_TOOLBAR_TOGGLE
code could revert to before version (remove set toggled and
invert flag to false, it is not necessary now). Now our code
is OK for wxITEM_NORMAL and wxITEM_CHECK kind button, but it
is not good for  wxITEM_RADIO kind button. Reference to
wxMSW code, I add some code to Realize() function, the first
item in the radio group is checked by default to be
consistent with wxGTK and the menu  radio items (the same
behavior). Then add some code in PerformAction() function to
handle wxITEM_RADIO kind button. 

After to use the second patch, the Toolbar behavior is
correct if we compare to other porting. However, we can
observe if we use HORIZONTAL and VERTICAL Toolbar together
(or two VERTICAL Toolbar), if the mouse move to  HORIZONTAL
first button then down, the button would remain under Mouse
enter state. This is another issue  and it exists in
previous version (2.6.2 and 2.6.3). However, It is difficult
for me to solve it since I don't know why.

----------------------------------------------------------------------

Comment By: Włodzimierz Skiba (abxabx)
Date: 2006-05-22 14:12

Message:
Logged In: YES 
user_id=652391

Thank you for your patch, it has been applied to both cvs 
branches.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1469227&group_id=9863




More information about the wx-dev mailing list