Ticket #3035: Resize.diff

File Resize.diff, 1.1 KB (added by nastee, 16 years ago)
  • src/kits/tracker/WidgetAttributeText.h

     
    357357    protected:
    358358        virtual void FitValue(BString *result, const BPoseView *);
    359359        virtual int64 ReadValue();
     360        virtual float PreferredWidth(const BPoseView *) const;
    360361
    361362        const BPoseView *fPoseView;
    362363        BString fRelationText;
  • src/kits/tracker/WidgetAttributeText.cpp

     
    17721772}
    17731773
    17741774
     1775float
     1776OpenWithRelationAttributeText::PreferredWidth(const BPoseView *pose) const
     1777{
     1778    BString widthString;
     1779    TruncString(&widthString, fRelationText.String(), fRelationText.Length(), pose,
     1780        100000, B_TRUNCATE_END);
     1781    return pose->StringWidth(widthString.String());
     1782}
     1783
     1784
    17751785void
    17761786OpenWithRelationAttributeText::FitValue(BString *result, const BPoseView *view)
    17771787{