[haiku-bugs] Re: [Haiku] #13496: The blue border for File Panel focus does not update correctly

  • From: "owenca" <trac@xxxxxxxxxxxx>
  • Date: Mon, 15 May 2017 00:16:42 -0000

#13496: The blue border for File Panel focus does not update correctly
----------------------------------+---------------------------------
   Reporter:  owenca              |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  high                |  Milestone:  R1/beta1
  Component:  Kits/libtracker.so  |    Version:  R1/Development
 Resolution:                      |   Keywords:  Tracker, BFilePanel
 Blocked By:                      |   Blocking:
Has a Patch:  1                   |   Platform:  All
----------------------------------+---------------------------------

Comment (by owenca):

 Replying to [comment:8 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.

--
Ticket URL: <https://dev.haiku-os.org/ticket/13496#comment:9>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: