From ce7ba37ad4e493769a126db2b39b8a9aa9121278 Mon Sep 17 00:00:00 2001 From: John Hood Date: Mon, 6 Nov 2017 09:30:57 -0500 Subject: [PATCH] Overlays were getting set to the wrong colors. Fix. --- src/frontend/terminaloverlay.cc | 8 ++++---- src/terminal/terminalframebuffer.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/terminaloverlay.cc b/src/frontend/terminaloverlay.cc index 916ba51..b1c906a 100644 --- a/src/frontend/terminaloverlay.cc +++ b/src/frontend/terminaloverlay.cc @@ -202,8 +202,8 @@ void NotificationEngine::apply( Framebuffer &fb ) const /* draw bar across top of screen */ Cell notification_bar( 0 ); - notification_bar.get_renditions().set_foreground_color( 37 ); - notification_bar.get_renditions().set_background_color( 44 ); + notification_bar.get_renditions().set_foreground_color( 7 ); + notification_bar.get_renditions().set_background_color( 4 ); notification_bar.append( 0x20 ); for ( int i = 0; i < fb.ds.get_width(); i++ ) { @@ -273,8 +273,8 @@ void NotificationEngine::apply( Framebuffer &fb ) const this_cell = fb.get_mutable_cell( 0, overlay_col ); fb.reset_cell( this_cell ); this_cell->get_renditions().set_attribute(Renditions::bold, true); - this_cell->get_renditions().set_foreground_color( 37 ); - this_cell->get_renditions().set_background_color( 44 ); + this_cell->get_renditions().set_foreground_color( 7 ); + this_cell->get_renditions().set_background_color( 4 ); this_cell->append( ch ); this_cell->set_wide( chwidth == 2 ); diff --git a/src/terminal/terminalframebuffer.h b/src/terminal/terminalframebuffer.h index 45dca5a..c6153ce 100644 --- a/src/terminal/terminalframebuffer.h +++ b/src/terminal/terminalframebuffer.h @@ -76,8 +76,8 @@ namespace Terminal { return (color & true_color_mask) != 0; } - unsigned int get_foreground_color() const { return foreground_color; } - unsigned int get_background_color() const { return background_color; } + // unsigned int get_foreground_rendition() const { return foreground_color; } + unsigned int get_background_rendition() const { return background_color; } bool operator==( const Renditions &x ) const { @@ -335,7 +335,7 @@ namespace Terminal { void add_rendition( color_type x ) { renditions.set_rendition( x ); } const Renditions& get_renditions( void ) const { return renditions; } Renditions& get_renditions( void ) { return renditions; } - int get_background_rendition( void ) const { return renditions.get_background_color(); } + int get_background_rendition( void ) const { return renditions.get_background_rendition(); } void save_cursor( void ); void restore_cursor( void );