diff --git a/headers/os/interface/TextView.h b/headers/os/interface/TextView.h
index 6fa15ca118..7017a87b98 100644
a
|
b
|
public:
|
246 | 246 | virtual BSize MaxSize(); |
247 | 247 | virtual BSize PreferredSize(); |
248 | 248 | |
249 | | virtual bool HasHeightForWidth(); |
250 | | virtual void GetHeightForWidth(float width, float* min, |
251 | | float* max, float* preferred); |
252 | | |
253 | 249 | private: |
254 | 250 | // FBC padding and forbidden methods |
255 | 251 | virtual void _ReservedTextView3(); |
diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp
index 952e29cba0..1eef217fa0 100644
a
|
b
|
BTextView::PreferredSize()
|
2570 | 2570 | } |
2571 | 2571 | |
2572 | 2572 | |
2573 | | bool |
2574 | | BTextView::HasHeightForWidth() |
2575 | | { |
2576 | | if (IsEditable()) |
2577 | | return BView::HasHeightForWidth(); |
2578 | | |
2579 | | // When not editable, we assume that all text is supposed to be visible. |
2580 | | return true; |
2581 | | } |
2582 | | |
2583 | | |
2584 | | void |
2585 | | BTextView::GetHeightForWidth(float width, float* min, float* max, |
2586 | | float* preferred) |
2587 | | { |
2588 | | if (IsEditable()) { |
2589 | | BView::GetHeightForWidth(width, min, max, preferred); |
2590 | | return; |
2591 | | } |
2592 | | |
2593 | | // TODO: don't change the actual text rect! |
2594 | | fTextRect.right = fTextRect.left + width; |
2595 | | _Refresh(0, TextLength(), false); |
2596 | | |
2597 | | if (min != NULL) |
2598 | | *min = fTextRect.Height(); |
2599 | | if (max != NULL) |
2600 | | *max = B_SIZE_UNLIMITED; |
2601 | | if (preferred != NULL) |
2602 | | *preferred = fTextRect.Height(); |
2603 | | } |
2604 | | |
2605 | | |
2606 | 2573 | // #pragma mark - Layout methods |
2607 | 2574 | |
2608 | 2575 | |