[haiku-commits] haiku: hrev53518 - src/kits/interface

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 27 Sep 2019 18:53:51 -0400 (EDT)

hrev53518 adds 1 changeset to branch 'master'
old head: 2d85a5644bb8a0590d273290492f9f66e0b8c020
new head: 07838f4cd367e87a711e7ba724648abe194213a9
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=07838f4cd367+%5E2d85a5644bb8

----------------------------------------------------------------------------

07838f4cd367: BTextView: preserve ViewUIColor when unarchiving
  
  When unarchiving, we can rely on BView to properly restore the colors,
  and we should not alter them. So move the code doing that outside of
  _InitObject, and into all non-unarchiving constructors instead.
  
  Change-Id: I98050c69bb3b8edf6e77ad0498e2dade5eaadb1d
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1887
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53518
Commit:      07838f4cd367e87a711e7ba724648abe194213a9
URL:         https://git.haiku-os.org/haiku/commit/?id=07838f4cd367
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Thu Sep 26 15:27:16 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Sep 27 22:53:42 2019 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 1 deletion(-)
src/kits/interface/TextView.cpp | 5 ++++-

----------------------------------------------------------------------------

diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp
index 396515e726..5fe8a7d984 100644
--- a/src/kits/interface/TextView.cpp
+++ b/src/kits/interface/TextView.cpp
@@ -263,6 +263,7 @@ BTextView::BTextView(BRect frame, const char* name, BRect 
textRect,
                flags | B_FRAME_EVENTS | B_PULSE_NEEDED | B_INPUT_METHOD_AWARE)
 {
        _InitObject(textRect, NULL, NULL);
+       SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR);
 }
 
 
@@ -274,6 +275,7 @@ BTextView::BTextView(BRect frame, const char* name, BRect 
textRect,
                flags | B_FRAME_EVENTS | B_PULSE_NEEDED | B_INPUT_METHOD_AWARE)
 {
        _InitObject(textRect, initialFont, initialColor);
+       SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR);
 }
 
 
@@ -283,6 +285,7 @@ BTextView::BTextView(const char* name, uint32 flags)
                flags | B_FRAME_EVENTS | B_PULSE_NEEDED | B_INPUT_METHOD_AWARE)
 {
        _InitObject(Bounds(), NULL, NULL);
+       SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR);
 }
 
 
@@ -293,6 +296,7 @@ BTextView::BTextView(const char* name, const BFont* 
initialFont,
                flags | B_FRAME_EVENTS | B_PULSE_NEEDED | B_INPUT_METHOD_AWARE)
 {
        _InitObject(Bounds(), initialFont, initialColor);
+       SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR);
 }
 
 
@@ -3124,7 +3128,6 @@ BTextView::_InitObject(BRect textRect, const BFont* 
initialFont,
        fLastClickOffset = -1;
 
        SetDoesUndo(true);
-       SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR);
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev53518 - src/kits/interface - waddlesplash