BTextControl:
* Placed _BTextInput_ into BPrivate namespace. * Made _BTextInput_::AlignTextRect() smarter, it centers the line vertically, for the case that the BTextControl has a larger label font. Improved insets for asthetics. * Used _BTextInput_::AlignTextRect() consistently in BTextControl, no more custom calls to SetTextRect(). Account for minimum vertical inset of 2 pixels in GetPreferredSize(). * Consistendly select all text when gaining focus in _BTextInput_. * Override MouseDown() in case the control did not have focus before, or else BTextView::MouseDown() will deselct the text again and place the cursor. (in line with BeOS behavior) * Removed unused fBool member from _BTextInput_ and other cleanup. BTextView: * Reimplemented BTextView::_AutoResize() so that it works well with BTextControl and autoscrolling when the alignment is not B_ALIGN_LEFT. I needed two new members for this, fLeftInset and fRightInset which are the original insets from the fTextRects. It might currently be broken for renaming things in Tracker, I will have to check. _AutoResize() no longer messes up the fTextRect insets. * Fixed stray carrets sometimes being left over, mostly when auto scrolling, but I observed them in other cases as well. * Prevent negative scrolling offsets when autoscrolling. Fixes weird scrolling offsets when navigating to the left. * Reset scrolling to B_ORIGIN when SetText() is called. Fixes for example starting to type in the middle of the control in Vision when entering new text and autoscrolling was triggered before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24101 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
#include <TextView.h>
|
||||
|
||||
class BLayoutItem;
|
||||
namespace BPrivate {
|
||||
class _BTextInput_;
|
||||
|
||||
}
|
||||
|
||||
class BTextControl : public BControl {
|
||||
public:
|
||||
@@ -105,7 +106,7 @@ class BTextControl : public BControl {
|
||||
void _UpdateFrame();
|
||||
|
||||
private:
|
||||
_BTextInput_* fText;
|
||||
BPrivate::_BTextInput_* fText;
|
||||
char* fLabel;
|
||||
BMessage* fModificationMessage;
|
||||
alignment fLabelAlign;
|
||||
|
||||
Reference in New Issue
Block a user