Author: yourpalal Date: 2011-06-18 03:52:29 +0200 (Sat, 18 Jun 2011) New Revision: 42228 Changeset: https://dev.haiku-os.org/changeset/42228 Modified: haiku/trunk/src/preferences/filetypes/ApplicationTypeWindow.cpp Log: Make the 'Long description' textview in FileTypes use the BScrollView::SetBorderHighlighted() method when it is focused, also enable tab-key navigation (which was the whole purpose of creating the custom class used for the field) with the B_NAVIGABLE flag. Modified: haiku/trunk/src/preferences/filetypes/ApplicationTypeWindow.cpp =================================================================== --- haiku/trunk/src/preferences/filetypes/ApplicationTypeWindow.cpp 2011-06-18 01:33:05 UTC (rev 42227) +++ haiku/trunk/src/preferences/filetypes/ApplicationTypeWindow.cpp 2011-06-18 01:52:29 UTC (rev 42228) @@ -70,8 +70,14 @@ virtual ~TabFilteringTextView(); virtual void KeyDown(const char* bytes, int32 count); + virtual void TargetedByScrollView(BScrollView* scroller); + virtual void MakeFocus(bool focused = true); + +private: + BScrollView* fScrollView; }; + class SupportedTypeItem : public BStringItem { public: SupportedTypeItem(const char* type); @@ -90,6 +96,7 @@ ::Icon fIcon; }; + class SupportedTypeListView : public DropTargetListView { public: SupportedTypeListView(const char* name, @@ -109,7 +116,8 @@ TabFilteringTextView::TabFilteringTextView(const char* name) : - BTextView(name, B_WILL_DRAW | B_PULSE_NEEDED) + BTextView(name, B_WILL_DRAW | B_PULSE_NEEDED | B_NAVIGABLE), + fScrollView(NULL) { } @@ -129,6 +137,23 @@ } +void +TabFilteringTextView::TargetedByScrollView(BScrollView* scroller) +{ + fScrollView = scroller; +} + + +void +TabFilteringTextView::MakeFocus(bool focused) +{ + BTextView::MakeFocus(focused); + + if (fScrollView) + fScrollView->SetBorderHighlighted(focused); +} + + // #pragma mark -