[haiku-commits] haiku: hrev54444 - src/apps/serialconnect

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 19 Jul 2020 10:29:09 -0400 (EDT)

hrev54444 adds 1 changeset to branch 'master'
old head: d74c554ce210d1242b4d67d8597d2e0b04a474c2
new head: 5033d6898f31fc4a081a177945ed62c932e4822b
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=5033d6898f31+%5Ed74c554ce210

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

5033d6898f31: SerialConnect: make reverse video work
  
  It's useful to see our openboot boot menu.
  
  I'm not sure what B_NEGATIVE_FACE is meant to do. The be book says
  "Characters are drawn in the low color, while the background is drawn in
  the high color.", but DrawString does not draw the background, so some
  color swapping will still be needed in this case anyway.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

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

Revision:    hrev54444
Commit:      5033d6898f31fc4a081a177945ed62c932e4822b
URL:         https://git.haiku-os.org/haiku/commit/?id=5033d6898f31
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Jul 19 13:02:43 2020 UTC

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

1 file changed, 5 insertions(+), 1 deletion(-)
src/apps/serialconnect/TermView.cpp | 6 +++++-

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

diff --git a/src/apps/serialconnect/TermView.cpp 
b/src/apps/serialconnect/TermView.cpp
index 50704ab73a..01e1b2adae 100644
--- a/src/apps/serialconnect/TermView.cpp
+++ b/src/apps/serialconnect/TermView.cpp
@@ -111,7 +111,7 @@ TermView::Draw(BRect updateRect)
                                background.alpha = 255;
 
                                // Draw the cursor by swapping foreground and 
background colors
-                               if (isCursor) {
+                               if (isCursor ^ cell.attrs.reverse) {
                                        SetLowColor(foreground);
                                        SetViewColor(foreground);
                                        SetHighColor(background);
@@ -135,8 +135,12 @@ TermView::Draw(BRect updateRect)
                                        font.SetFace(B_ITALIC_FACE);
                                if (cell.attrs.blink) // FIXME make it actually 
blink
                                        font.SetFace(B_OUTLINED_FACE);
+#if 0
+                               // FIXME B_NEGATIVE_FACE isn't actually 
implemented so we
+                               // instead swap the colors above
                                if (cell.attrs.reverse)
                                        font.SetFace(B_NEGATIVE_FACE);
+#endif
                                if (cell.attrs.strike)
                                        font.SetFace(B_STRIKEOUT_FACE);
 


Other related posts:

  • » [haiku-commits] haiku: hrev54444 - src/apps/serialconnect - Adrien Destugues