[haiku-commits] Re: BRANCH HaikuPM-github.package-management [b53a2e6] src/kits/interface headers/private/interface src/servers/package headers/os/interface

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 11 Sep 2013 09:32:47 +0200

Hi,

On 11.09.2013 05:00, HaikuPM-github.package-management wrote:
+       // set small scroll step (large step will be set by the view port)
+       BFont font;
+       topTextView->GetFont(&font);
+       font_height fontHeight;
+       font.GetHeight(&fontHeight);
+       float smallStep = ceilf(fontHeight.ascent + fontHeight.descent);
+       viewPort->ScrollBar(B_VERTICAL)->SetSteps(smallStep, smallStep);

Just for reference, there is a shortcut possible:

> +  font_height fontHeight;
> +  topTextView->GetFontHeight(&fontHeight);

Best regards,
-Stephan


Other related posts: