From 825e7fc959159b98bb9041891748580fc07d59cc Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 24 Oct 2015 13:38:58 +0200 Subject: [PATCH] Color setting improvements --- src/fbutton.cpp | 8 ++++++-- src/flineedit.cpp | 2 +- src/flistbox.cpp | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/fbutton.cpp b/src/fbutton.cpp index c7e2f74b..87c93543 100644 --- a/src/fbutton.cpp +++ b/src/fbutton.cpp @@ -291,7 +291,7 @@ void FButton::draw() setCursorPos ( xpos+xmin-1+margin+i+hotkeypos , ypos+ymin-1+j ); // hotkey - if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) + if ( is_ActiveFocus && (isMonochron() || getMaxColor() < 16) ) setBold(); for (int z=0; x < i+length && z < width; z++,x++) @@ -299,9 +299,13 @@ void FButton::draw() if ( (z == hotkeypos) && is_Active ) { setColor (button_hotkey_fg, button_bg); + if ( ! is_ActiveFocus && getMaxColor() < 16 ) + setBold(); if ( ! is_NoUnderline ) setUnderline(); print ( ButtonText[z] ); + if ( ! is_ActiveFocus && getMaxColor() < 16 ) + unsetBold(); if ( ! is_NoUnderline ) unsetUnderline(); setColor (button_fg, button_bg); @@ -312,7 +316,7 @@ void FButton::draw() } } - if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) + if ( is_ActiveFocus && (isMonochron() || getMaxColor() < 16) ) unsetBold(); for (x=i+length; x < width-1; x++) diff --git a/src/flineedit.cpp b/src/flineedit.cpp index 5179fed5..5a66d45e 100644 --- a/src/flineedit.cpp +++ b/src/flineedit.cpp @@ -482,7 +482,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) setKDECursor(fc::BlockCursor); setConsoleCursor(fc::full_block_cursor); if ( isUrxvtTerminal() ) - setXTermCursorColor("rgb:0000/0000/0000"); + setXTermCursorColor("rgb:eeee/0000/0000"); } ev->accept(); break; diff --git a/src/flistbox.cpp b/src/flistbox.cpp index ac77a1ad..fc940760 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -306,10 +306,10 @@ void FListBox::drawList() } else { - if ( isFocus && getMaxColor() < 16 ) - unsetBold(); if ( isMonochron() ) setReverse(true); + else if ( isFocus && getMaxColor() < 16 ) + unsetBold(); } // print the entry