Debugger: Fix MemoryView layout issues.

MemoryView:
- Implement {Min,Max,Preferred}Size() hooks. The default BView
  versions were causing the inspector to sometimes not be properly
  resizable after previous settings were restored.
This commit is contained in:
Rene Gollent
2015-05-23 16:54:14 -04:00
parent 40d8306053
commit 82bf490fa6
2 changed files with 28 additions and 2 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2014, Rene Gollent, [email protected]. All rights reserved.
* Copyright 2011-2015, Rene Gollent, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@@ -521,6 +521,27 @@ MemoryView::TargetedByScrollView(BScrollView* scrollView)
}
BSize
MemoryView::MinSize()
{
return BSize(0.0, 0.0);
}
BSize
MemoryView::PreferredSize()
{
return MinSize();
}
BSize
MemoryView::MaxSize()
{
return BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED);
}
void
MemoryView::_Init()
{
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2013, Rene Gollent, [email protected]. All rights reserved.
* Copyright 2011-2015, Rene Gollent, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@@ -72,6 +72,11 @@ public:
void ScrollToSelection();
virtual void TargetedByScrollView(BScrollView* scrollView);
virtual BSize MinSize();
virtual BSize PreferredSize();
virtual BSize MaxSize();
private:
void _Init();
void _RecalcScrollBars();