Color setting improvements

This commit is contained in:
Markus Gans 2015-10-24 13:38:58 +02:00
parent e0246d6d9e
commit 825e7fc959
3 changed files with 9 additions and 5 deletions

View File

@ -291,7 +291,7 @@ void FButton::draw()
setCursorPos ( xpos+xmin-1+margin+i+hotkeypos setCursorPos ( xpos+xmin-1+margin+i+hotkeypos
, ypos+ymin-1+j ); // hotkey , ypos+ymin-1+j ); // hotkey
if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) if ( is_ActiveFocus && (isMonochron() || getMaxColor() < 16) )
setBold(); setBold();
for (int z=0; x < i+length && z < width; z++,x++) for (int z=0; x < i+length && z < width; z++,x++)
@ -299,9 +299,13 @@ void FButton::draw()
if ( (z == hotkeypos) && is_Active ) if ( (z == hotkeypos) && is_Active )
{ {
setColor (button_hotkey_fg, button_bg); setColor (button_hotkey_fg, button_bg);
if ( ! is_ActiveFocus && getMaxColor() < 16 )
setBold();
if ( ! is_NoUnderline ) if ( ! is_NoUnderline )
setUnderline(); setUnderline();
print ( ButtonText[z] ); print ( ButtonText[z] );
if ( ! is_ActiveFocus && getMaxColor() < 16 )
unsetBold();
if ( ! is_NoUnderline ) if ( ! is_NoUnderline )
unsetUnderline(); unsetUnderline();
setColor (button_fg, button_bg); 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(); unsetBold();
for (x=i+length; x < width-1; x++) for (x=i+length; x < width-1; x++)

View File

@ -482,7 +482,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev)
setKDECursor(fc::BlockCursor); setKDECursor(fc::BlockCursor);
setConsoleCursor(fc::full_block_cursor); setConsoleCursor(fc::full_block_cursor);
if ( isUrxvtTerminal() ) if ( isUrxvtTerminal() )
setXTermCursorColor("rgb:0000/0000/0000"); setXTermCursorColor("rgb:eeee/0000/0000");
} }
ev->accept(); ev->accept();
break; break;

View File

@ -306,10 +306,10 @@ void FListBox::drawList()
} }
else else
{ {
if ( isFocus && getMaxColor() < 16 )
unsetBold();
if ( isMonochron() ) if ( isMonochron() )
setReverse(true); setReverse(true);
else if ( isFocus && getMaxColor() < 16 )
unsetBold();
} }
// print the entry // print the entry