[haiku-development] Re: interesting behavior in BControl::InitData

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 12 Apr 2008 20:50:04 +0200

Rene Gollent wrote:
> Is there a particular reason that BControl's archive constructor 
> deliberately discards archived font information? I noticed that if it 
> detects the presence of BView's font archive members (_fname), it goes 
> out of its way to then reset itself to be_plain_font, which seems like it 
> wouldn't be desired behavior.

BView::SetFont() is being told what aspects of the font are modified. It 
could use either that information and/or manually compare with the current 
font and strip those flags to the really needed ones (has pros and cons), 
and cache that info for archiving. For example, if a BView is configured to 
the system plain font at a smaller size, then it could be desirable to 
replicate the effects of that even though the user changed the system plain 
font before the view is instantiated again. In any case, I don't know why 
BControl was written like that.

Best regards,
-Stephan

Other related posts: