BTextView: Use document colors on AdoptSystemColors()

AdoptSystemColors() tints document background color to match panel
color if uneditable.

Calling MakeEditable() will automatically apply or unapply uneditable
background tint if you have previously called AdoptSystemColors().

Parent BView::AdoptSystemColors() sets panel colors, we want document
colors here. Do not alter text color - only view, low and high colors
are changed.

Document AdoptSystemColors() and MakeEditable() in BTextView docs.

Change-Id: Ib215735f27bb01fc2f95fcf2fee0185e5fc83f70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8263
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
John Scipione
2025-01-17 16:57:38 +00:00
committed by waddlesplash
parent 13553050f9
commit 9105063938
3 changed files with 78 additions and 3 deletions
+5
View File
@@ -131,6 +131,8 @@ public:
void SelectAll();
void GetSelection(int32* _start, int32* _end) const;
void AdoptSystemColors();
void SetFontAndColor(const BFont* font,
uint32 mode = B_FONT_ALL,
const rgb_color* color = NULL);
@@ -426,6 +428,9 @@ private:
float _TextHeight();
BRect _TextRect();
float _UneditableTint();
bool _UsesSystemColors();
private:
BPrivate::TextGapBuffer* fText;
LineBuffer* fLines;