[haiku-commits] Re: haiku: hrev43773 - in src: apps/activitymonitor kits/interface

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 23 Feb 2012 08:42:13 +0100

Am 23.02.2012 01:12, schrieb stpere@xxxxxxxxx:
hrev43773 adds 1 changeset to branch 'master'
old head: f1553a0fc450d8a1442f6a52873906ca98e14a86
new head: d63b75faf848697b07bfad9b71899e6caf9ab5bc

----------------------------------------------------------------------------

d63b75f: Outline of labels/strings drawn to desktop

   * Rather than duplicating the decision taking logic involving wheter or not 
to draw
   the outline or glow in every replicant, update be_control_look to make it 
more
   generic.
   * The Monitoring of the background preferences is now only done in Tracker 
(where it
   was already being done).
   * Add a BControlLook::B_IGNORE_OUTLINE flag to avoid this new behaviour.
   * Remove that said logic from ActivityMonitor and use be_control_look.
   * Use the ignore flag in DeskCalc to avoid the outline in its case.

   Should fix #7716, #7291.

Hm, I would change this a bit. Your solution puts too much thinking and knowledge into BControlLook, where it doesn't (IMHO) belong and leaves too little flexibility to the user. What if I want to render text onto an image that looks like labels on the desktop? I can't, since the view I render into is not the Desktop.

So instead of B_IGNORE_OUTLINE, make a reverse flag. And maybe one for each outline drawing mode (glow and shadow). Then you may or may not leave the Desktop background info stuff out of BControlLook. I would find it cleaner if it would be moved out of there. I don't know, perhaps put it into BScreen, where one can already ask for the current Desktop background color, if memory serves. How you implemented this with Tracker updating this stuff feels somehow like a layering violation.

And then the replicants and Tracker, which want a specific label drawing mode can ask BControlLook via the two new flags. And other apps can too, if they need to.

Best regards,
-Stephan


Other related posts: