#13496 closed bug (fixed)
The blue border for File Panel focus does not update correctly
Reported by: | owenca | Owned by: | nobody |
---|---|---|---|
Priority: | high | Milestone: | R1/beta1 |
Component: | Kits/libtracker.so | Version: | R1/Development |
Keywords: | Tracker, BFilePanel | Cc: | axeld, waddlesplash, looncraz |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Press the Tab key to move the focus to the Cancel button: the blue border enclosing the file list does not disappear completely.
Now click another window to deactivate the file panel and then click the file panel to activate it again: the Cancel button still has the focus, but the file list is enclosed by the blue border as if it had the focus, too.
Please see the attached screenshots.
might be related to #12923
Attachments (8)
Change History (27)
by , 8 years ago
Attachment: | Expander 1.png added |
---|
by , 8 years ago
Attachment: | Expander 2.png added |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
by , 8 years ago
Attachment: | Save as.png added |
---|
comment:4 by , 8 years ago
Thanks for finding this.
This is easy to reproduce, but I can't see, yet, why it's happening.
BPoseView::MakeFocus() calls BorderedView::PoseViewFocused() whose logic works fine everywhere else (and is simple enough).
My only thought is that it is somehow not being called when focus is being lost when the view is part of the TFilePanel BWindow. I will continue to investigate this.
comment:5 by , 8 years ago
patch: | 0 → 1 |
---|
by , 8 years ago
Attachment: | Expander now.png added |
---|
by , 8 years ago
Attachment: | Save as now.png added |
---|
by , 8 years ago
Attachment: | Expander new.png added |
---|
follow-up: 9 comment:8 by , 8 years ago
Awesome! I was just refreshing to the latest hrev and you have a patch :p
BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
If you're going to use dynamic_cast you should probably check for NULL. In this case, though, I'd think that static_cast would be more appropriate.
Also, the "Save as now" seems to be missing the border entirely, which might just be the color choice (probably changing color_which base = B_DOCUMENT_BACKGROUND_COLOR to B_PANEL_BACKGROUND_COLOR on line 4418 of ContainerWindow.cpp will resolve that).
follow-ups: 10 13 comment:9 by , 8 years ago
Replying to looncraz:
BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
If you're going to use dynamic_cast you should probably check for NULL. In this case, though, I'd think that static_cast would be more appropriate.
I copied the code from BorderedView::PoseViewFocused() at line 4416 but forgot to copy the two lines below it that check for NULL. I will fix it. Should I still use dynamic_cast just to be consistent?
Also, the "Save as now" seems to be missing the border entirely, which might just be the color choice (probably changing color_which base = B_DOCUMENT_BACKGROUND_COLOR to B_PANEL_BACKGROUND_COLOR on line 4418 of ContainerWindow.cpp will resolve that).
I just tested it a little more, and this is what happens:
- Remove
~/config/settings/Tracker/FilePanelSettings
. - Run Pe and open the Save as... panel. The border is fine. See the attached screenshot "Save as after FilePanelSettings removed" below.
- Now quit Pe and then run it again. The border in the Save as... panel is messed up as shown in the previously attached screenshot "Save as now".
This only occurs in Save file panel. The Open file panel has no problem.
by , 8 years ago
Attachment: | Save as after FilePanelSettings removed.png added |
---|
follow-up: 11 comment:10 by , 8 years ago
Replying to owenca:
I copied the code from BorderedView::PoseViewFocused() at line 4416 but forgot to copy the two lines below it that check for NULL. I will fix it. Should I still use dynamic_cast just to be consistent?
I think that would be the way to go, it's just a minor run time penalty (a handful of cycles) in any event. If someone wants to improve efficiency, let them do that separately ;-)
I just tested it a little more, and this is what happens:
- Remove
~/config/settings/Tracker/FilePanelSettings
.- Run Pe and open the Save as... panel. The border is fine. See the attached screenshot "Save as after FilePanelSettings removed" below.
- Now quit Pe and then run it again. The border in the Save as... panel is messed up as shown in the previously attached screenshot "Save as now".
This only occurs in Save file panel. The Open file panel has no problem.
Very strange. I will have to run some tests when you post an updated patch to wrap my mind around what you're describing.
comment:11 by , 8 years ago
Very strange. I will have to run some tests when you post an updated patch to wrap my mind around what you're describing.
Do you want me to include in my next patch your suggestion of "changing color_which base = B_DOCUMENT_BACKGROUND_COLOR to B_PANEL_BACKGROUND_COLOR on line 4418 of ContainerWindow.cpp"?
comment:12 by , 8 years ago
New patch attached, with B_DOCUMENT_BACKGROUND_COLOR changed to B_DOCUMENT_BACKGROUND_COLOR.
The border problem with Save file panel is still there.
follow-up: 14 comment:13 by , 8 years ago
Replying to owenca:
I just tested it a little more, and this is what happens:
- Remove
~/config/settings/Tracker/FilePanelSettings
.- Run Pe and open the Save as... panel. The border is fine. See the attached screenshot "Save as after FilePanelSettings removed" below.
- Now quit Pe and then run it again. The border in the Save as... panel is messed up as shown in the previously attached screenshot "Save as now".
Sounds like what Giovanni reported in #13497.
follow-ups: 16 17 comment:14 by , 8 years ago
The broken border of the Save panel was in hrev51166 already, so it's not caused by the patch.
by , 8 years ago
Attachment: | 0001-Tracker-Fix-blue-border-for-focus-in-file-panel.patch added |
---|
comment:15 by , 8 years ago
Please see the latest patch above, with B_DOCUMENT_BACKGROUND_COLOR unchanged.
comment:16 by , 8 years ago
comment:17 by , 8 years ago
comment:20 by , 8 years ago
Replying to owenca:
looncraz: apply the patch and close this ticket?
Looks like waddlesplash beat me to it :p
Also, the Save File Panel has two blue bordered boxes (file list and file name) when first activated. Please see the attached screenshot.