Bug #955
When mouse leave bar area, item should lose highlight
Status: | Approved | Start date: | 01/10/2015 | ||
---|---|---|---|---|---|
Priority: | High | Due date: | |||
Assignee: | Zbigniew Rebacz | % Done: | 90% | ||
Category: | CtrlLib | Spent time: | - | ||
Target version: | - |
Description
After experimenting with bars I have found one important problem. Item highlight dose not lose highlight when mouse leave bar area.
P.S. 1
Only last element (youngest child) in bar hierarchy should lose item focus.
History
#1 Updated by Zbigniew Rebacz almost 10 years ago
What is strange here is that bar is losing highlight for items that creates another bars (characteristic items with arrow on the right-side).
#2 Updated by Zbigniew Rebacz almost 10 years ago
- Status changed from New to Patch ready
- Assignee set to Miroslav Fidler
- % Done changed from 0 to 90
I have found simply solution for this issue (you will probably find better and more elegant :) ):
Code (CtrlLib/MenuItem.cpp):
void MenuItem::MouseLeave() { // Added if + Refresh if(HasFocus() && GetParent()) GetParent()->SetFocus(); Refresh(); ClearHelpLine(); }
#3 Updated by Zbigniew Rebacz almost 10 years ago
- Priority changed from Normal to High
#4 Updated by Zbigniew Rebacz almost 10 years ago
I would like to notice that this soultion can lead to unnecessary refresh when changing menu items. This should be only activate when mouse leave window (bar) area. But, I can be wrong (I don't know the bar family implementation).
#5 Updated by Zbigniew Rebacz almost 10 years ago
Refresh is not needed:
void MenuItem::MouseLeave() { // Added if + Refresh if(HasFocus() && GetParent()) GetParent()->SetFocus(); ClearHelpLine(); }
#6 Updated by Miroslav Fidler almost 10 years ago
- Status changed from Patch ready to Approved
- Assignee changed from Miroslav Fidler to Zbigniew Rebacz
Thanks, this is more inline with standard behaviour....