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:
committed by
waddlesplash
parent
13553050f9
commit
9105063938
@@ -183,6 +183,8 @@
|
||||
to be selectable or editable off. A non-editable, non-selectable text
|
||||
view can be useful as a BStringView that wraps.
|
||||
|
||||
Call AdoptSystemColors() to set default colors.
|
||||
|
||||
Call MakeResizable() to make the view width track with text width,
|
||||
this can be useful for short single-line text views.
|
||||
|
||||
@@ -1226,9 +1228,14 @@
|
||||
\fn void BTextView::MakeEditable(bool editable)
|
||||
\brief Sets whether or not the text is editable.
|
||||
|
||||
Will automatically tint document colors to indicate uneditable
|
||||
if you have previously called AdoptSystemColors().
|
||||
|
||||
\param editable Pass in \c true to set the text to be editable,
|
||||
\c false to set the object to be not editable.
|
||||
|
||||
\see AdoptSystemColors()
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
@@ -1341,13 +1348,41 @@
|
||||
|
||||
|
||||
/*!
|
||||
\name Word Wrap
|
||||
\name Color Adoption
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn BTextView::AdoptSystemColors()
|
||||
\brief Adopts document colors tinted to match panel background if uneditable.
|
||||
|
||||
- \c B_DOCUMENT_BACKGROUND_COLOR for ViewUIColor()
|
||||
- \c B_DOCUMENT_BACKGROUND_COLOR for LowUIColor()
|
||||
- \c B_DOCUMENT_TEXT_COLOR for HighUIColor()
|
||||
|
||||
View and low colors tinted \c B_DARKEN_1_TINT (inverse on dark) if uneditable.
|
||||
|
||||
Does not alter text color.
|
||||
|
||||
\see BView::AdoptSystemColors(), MakeEditable()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*!
|
||||
\name Word Wrap
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTextView::SetWordWrap(bool wrap)
|
||||
|
||||
Reference in New Issue
Block a user