Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9915 closed bug (fixed)

BButton focus behaves differently from others

Reported by: ttcoder Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

A very very very minor "bug" in hrev45824 :

If a window loses focus/is deactivated (e.g. pushed to back), the CurrentFocus() view in that window will redraw itself without the blue line, and redraw it back when the window gets active again. This was true for all BControls in BeOS.

The bug is that... in Haiku this is true for all except BButton. At first, it seems BButton::Draw() makes the decision to draw the line only based on BView::IsFocus() but forgets to also check Window()->IsActive(), so that would be easy to fix, just add the missing check.

But looking at its Draw() and WindowActivated() it seems everything is in order. Maybe the problem is in BControlLook (but if so then why are the other bcontrols not affected?).

Change History (2)

comment:1 Changed 6 years ago by jscipione

Resolution: fixed
Status: newclosed

Fixed in hrev45963. Checked R5 and you are right: controls are only draw as focused when their parent window is active. This bug affected all controls that used BControlLook to draw their focus ring including BButton, BCheckBox, and BRadioButton.

comment:2 Changed 6 years ago by ttcoder

Thanks John, and good catch.. I was so focused on the one app I was working on (which uses BMenuField, BListView, BTextControl but not checkboxes or radio buttons) that I believed it was "all" controls that were affected. Anyway. Now they all agree and everything is consistent. I like consistent. *g*

Note: See TracTickets for help on using tickets.