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.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42228 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7d5fd9326c
commit
bbfcd83bde
@ -70,8 +70,14 @@ public:
|
||||
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 @@ private:
|
||||
::Icon fIcon;
|
||||
};
|
||||
|
||||
|
||||
class SupportedTypeListView : public DropTargetListView {
|
||||
public:
|
||||
SupportedTypeListView(const char* name,
|
||||
@ -109,7 +116,8 @@ public:
|
||||
|
||||
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 @@ TabFilteringTextView::KeyDown(const char* bytes, int32 count)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TabFilteringTextView::TargetedByScrollView(BScrollView* scroller)
|
||||
{
|
||||
fScrollView = scroller;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TabFilteringTextView::MakeFocus(bool focused)
|
||||
{
|
||||
BTextView::MakeFocus(focused);
|
||||
|
||||
if (fScrollView)
|
||||
fScrollView->SetBorderHighlighted(focused);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user