[haiku-commits] Re: haiku: hrev50428 - src/apps/deskcalc

  • From: "Humdinger" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "humdingerb" for DMARC)
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 20 Jul 2016 07:41:10 +0200

On 19 July 2016 at 23:38, looncraz <looncraz@xxxxxxxxxxx> wrote:

  void
  CalcView::_Colorize()
  {
-       fBaseColor = ui_color(B_PANEL_BACKGROUND_COLOR);
-
I fear you have likely prevented all live color updates from occurring.  You
may need to use a flag to prevent refreshing fBaseColor on _Colorize() only
if a color has been dropped in order to preserve live color updates.

Why should DeskCalc be special and use its own B_PANEL_BACKGROUND_COLOR?
IMO, that feature only makes sense in case DeskCalc is used as a
Replicant, to better fit into the user's Desktop background.
I tried that with adding a conditional that is used elsewhere in the code [1]:

if (Parent() && (Parent()->Flags() & B_DRAW_ON_CHILDREN) == 0) {
/* update to the current system background color,
  if we aren't a replicant on the desktop */
fBaseColor = ui_color(B_PANEL_BACKGROUND_COLOR);
}

But that doesn't work for some reason...

Regards,
Humdinger

[1] http://cgit.haiku-os.org/haiku/tree/src/apps/deskcalc/CalcView.cpp#n218

--
Did you know:
  If half the Haiku supporters at http://www.goodsearch.com
  made 10 searches a day, we could have a fulltime developer.

Other related posts: