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
, 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++)

View File

@ -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;

View File

@ -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