From b9fa26965a2a295d355457598a56d24de5c92109 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 23 Oct 2015 23:57:00 +0200 Subject: [PATCH] Color setting improvements --- ChangeLog | 3 + src/fbutton.cpp | 6 +- src/fdialog.cpp | 5 + src/flineedit.cpp | 22 ++- src/flistbox.cpp | 18 ++- src/fmenuitem.cpp | 1 + src/fprogressbar.cpp | 3 +- src/fscrollbar.cpp | 4 +- src/fswitch.cpp | 21 +-- src/fterm.cpp | 39 +++--- src/fterm.h | 4 +- src/ftextview.cpp | 1 + src/fwidget.cpp | 312 ++++++++++++++++++++++--------------------- src/fwidget.h | 2 + 14 files changed, 241 insertions(+), 200 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ad66460..98ae340d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-10-23 Markus Gans + * Color setting improvements + 2015-10-22 Markus Gans * Make cursor visibility more standards compliant. diff --git a/src/fbutton.cpp b/src/fbutton.cpp index 90bb360d..c7e2f74b 100644 --- a/src/fbutton.cpp +++ b/src/fbutton.cpp @@ -185,7 +185,7 @@ void FButton::draw() if ( ! is_Active && isMonochron() ) space = fc::MediumShade; // ▒ - if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) + if ( isMonochron() && is_ActiveFocus ) { txt = "<" + txt + ">"; length = int(txt.getLength()); @@ -291,7 +291,7 @@ void FButton::draw() setCursorPos ( xpos+xmin-1+margin+i+hotkeypos , ypos+ymin-1+j ); // hotkey - if ( isMonochron() && is_ActiveFocus ) + if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) setBold(); for (int z=0; x < i+length && z < width; z++,x++) @@ -312,7 +312,7 @@ void FButton::draw() } } - if ( isMonochron() && is_ActiveFocus ) + if ( (isMonochron() || getMaxColor() < 16) && is_ActiveFocus ) unsetBold(); for (x=i+length; x < width-1; x++) diff --git a/src/fdialog.cpp b/src/fdialog.cpp index 886df726..2bdb80fa 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -206,6 +206,7 @@ void FDialog::drawTitleBar() setReverse(true); } + if ( isNewFont() ) { print (fc::NF_rev_menu_button1); @@ -218,6 +219,8 @@ void FDialog::drawTitleBar() print (" - "); // fill with spaces (left of the title) + if ( getMaxColor() < 16 ) + setBold(); if ( isActiveWindow() ) setColor (wc.titlebar_active_fg, wc.titlebar_active_bg); else @@ -236,6 +239,8 @@ void FDialog::drawTitleBar() for (; x+1+int(length) < width-1; x++) print (' '); + if ( getMaxColor() < 16 ) + unsetBold(); if ( isMonochron() ) setReverse(false); diff --git a/src/flineedit.cpp b/src/flineedit.cpp index 320fa52c..5179fed5 100644 --- a/src/flineedit.cpp +++ b/src/flineedit.cpp @@ -55,7 +55,7 @@ FLineEdit::~FLineEdit() // destructor setKDECursor(fc::UnderlineCursor); setConsoleCursor(fc::underscore_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:ffff/ffff/ffff"); + setXTermCursorColor("rgb:ffff/ffff/ffff"); } if ( hasFocus() ) hideCursor(); @@ -175,6 +175,10 @@ void FLineEdit::drawInputField() else print (fc::RightHalfBlock); // ▐ } + + if ( isActiveFocus && getMaxColor() < 16 ) + setBold(); + setColor (foregroundColor, backgroundColor); show_text = text.mid(uInt(1+offset), uInt(width-2)); @@ -193,6 +197,10 @@ void FLineEdit::drawInputField() print (' '); x++; } + + if ( isActiveFocus && getMaxColor() < 16 ) + unsetBold(); + if ( isMonochron() ) { setReverse(false); @@ -466,7 +474,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) setKDECursor(fc::UnderlineCursor); setConsoleCursor(fc::underscore_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:ffff/ffff/ffff"); + setXTermCursorColor("rgb:ffff/ffff/ffff"); } else { @@ -474,7 +482,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) setKDECursor(fc::BlockCursor); setConsoleCursor(fc::full_block_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:0000/0000/0000"); + setXTermCursorColor("rgb:0000/0000/0000"); } ev->accept(); break; @@ -717,7 +725,7 @@ void FLineEdit::onHide (FHideEvent*) setKDECursor(fc::UnderlineCursor); setConsoleCursor(fc::underscore_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:ffff/ffff/ffff"); + setXTermCursorColor("rgb:ffff/ffff/ffff"); } if ( hasFocus() ) hideCursor(); @@ -735,7 +743,7 @@ void FLineEdit::onFocusIn (FFocusEvent*) setKDECursor(fc::UnderlineCursor); setConsoleCursor(fc::underscore_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:ffff/ffff/ffff"); + setXTermCursorColor("rgb:ffff/ffff/ffff"); } else { @@ -743,7 +751,7 @@ void FLineEdit::onFocusIn (FFocusEvent*) setKDECursor(fc::BlockCursor); setConsoleCursor(fc::full_block_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:0000/0000/0000"); + setXTermCursorColor("rgb:0000/0000/0000"); } if ( statusBar() ) { @@ -768,7 +776,7 @@ void FLineEdit::onFocusOut (FFocusEvent*) setKDECursor(fc::UnderlineCursor); setConsoleCursor(fc::underscore_cursor); if ( isUrxvtTerminal() ) - setXTermCursor("rgb:ffff/ffff/ffff"); + setXTermCursorColor("rgb:ffff/ffff/ffff"); } hideCursor(); diff --git a/src/flistbox.cpp b/src/flistbox.cpp index 4be2fd80..ac77a1ad 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -263,19 +263,26 @@ void FListBox::drawList() if ( isCurrentLine ) { + if ( isFocus && getMaxColor() < 16 ) + setBold(); if ( isLineSelected ) { if ( isMonochron() ) setBold(); + else if ( isFocus ) + setColor ( wc.selected_current_element_focus_fg + , wc.selected_current_element_focus_bg ); else setColor ( wc.selected_current_element_fg , wc.selected_current_element_bg ); + setCursorPos ( xpos+xmin+1 + , ypos+ymin+int(y) ); // first character } else { if ( isMonochron() ) unsetBold(); - else if ( isFocus ) + if ( isFocus ) { setColor ( wc.current_element_focus_fg , wc.current_element_focus_bg ); @@ -297,8 +304,13 @@ void FListBox::drawList() if ( isMonochron() ) setReverse(false); } - else if ( isMonochron() ) - setReverse(true); + else + { + if ( isFocus && getMaxColor() < 16 ) + unsetBold(); + if ( isMonochron() ) + setReverse(true); + } // print the entry if ( isMonochron() && isCurrentLine ) diff --git a/src/fmenuitem.cpp b/src/fmenuitem.cpp index b609fccf..4d5527c6 100644 --- a/src/fmenuitem.cpp +++ b/src/fmenuitem.cpp @@ -204,6 +204,7 @@ void FMenuItem::processClicked() //---------------------------------------------------------------------- void FMenuItem::onAccel (FAccelEvent* ev) { + beep(); // activate by key if ( isActivated() && ! isSelected() ) { if ( super_menu && isMenuBar(super_menu) ) diff --git a/src/fprogressbar.cpp b/src/fprogressbar.cpp index f140e028..88019c6a 100644 --- a/src/fprogressbar.cpp +++ b/src/fprogressbar.cpp @@ -43,7 +43,7 @@ void FProgressbar::drawBar() { int i = 1; float length = float(BarLength*percentage)/100; - + gotoxy (xpos+xmin-1, ypos+ymin-1); if ( isMonochron() ) { @@ -129,6 +129,7 @@ void FProgressbar::drawBar() } if ( isMonochron() ) setReverse(false); + updateTerminal(); flush_out(); } diff --git a/src/fscrollbar.cpp b/src/fscrollbar.cpp index 6ac66510..f55b1d86 100644 --- a/src/fscrollbar.cpp +++ b/src/fscrollbar.cpp @@ -80,11 +80,11 @@ void FScrollbar::init() //---------------------------------------------------------------------- void FScrollbar::draw() { - //setUpdateVTerm(false); + setUpdateVTerm(false); drawButtons(); currentSliderPos = -1; drawBar(); - //setUpdateVTerm(true); + setUpdateVTerm(true); } //---------------------------------------------------------------------- diff --git a/src/fswitch.cpp b/src/fswitch.cpp index bf41832c..4b75a276 100644 --- a/src/fswitch.cpp +++ b/src/fswitch.cpp @@ -62,11 +62,13 @@ void FSwitch::drawCheckButton() if ( hasFocus() && ! button_pressed ) { if ( isMonochron() ) - setBold(true); - - if ( isMonochron() || getMaxColor() < 16 ) { wcsncpy ( on, L" ", 6); + setBold(true); + } + else if ( getMaxColor() < 16 ) + { + setBold(true); setColor (wc.button_active_focus_fg, wc.button_active_focus_bg); } else @@ -84,10 +86,10 @@ void FSwitch::drawCheckButton() print (on); if ( isMonochron() ) - { setReverse(true); + + if ( isMonochron() || getMaxColor() < 16 ) setBold(false); - } setColor (wc.button_inactive_fg, wc.button_inactive_bg); print (off); @@ -108,10 +110,13 @@ void FSwitch::drawCheckButton() if ( hasFocus() && ! button_pressed ) { if ( isMonochron() ) - setBold(true); - if ( isMonochron() || getMaxColor() < 16 ) { wcsncpy ( off, L"", 6); + setBold(true); + } + else if ( getMaxColor() < 16 ) + { + setBold(true); setColor (wc.button_active_focus_fg, wc.button_active_focus_bg); } else @@ -128,7 +133,7 @@ void FSwitch::drawCheckButton() print (off); - if ( isMonochron() ) + if ( isMonochron() || getMaxColor() < 16 ) setBold(false); setCursorPos ( xpos + xmin + 5 + switch_offset_pos diff --git a/src/fterm.cpp b/src/fterm.cpp index 5ad0ea48..80a5f3f6 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -1054,7 +1054,7 @@ void FTerm::init_termcaps() tcap[t_set_a_background].string = \ const_cast("\033[4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m"); } - else if ( tera_terminal && color256 ) + else if ( tera_terminal ) { tcap[t_set_a_foreground].string = \ const_cast("\033[38;5;%p1%dm"); @@ -1497,10 +1497,10 @@ void FTerm::init() setXTermMouseBackground("rgb:ffff/ffff/ffff"); setXTermMouseForeground ("rgb:0000/0000/0000"); if ( ! gnome_terminal ) - setXTermCursor("rgb:ffff/ffff/ffff"); - if ( ! gnome_terminal && ! mintty_terminal ) + setXTermCursorColor("rgb:ffff/ffff/ffff"); + if ( ! mintty_terminal ) { - // gnome-terminal and mintty can't reset these settings + // mintty can't reset these settings setXTermBackground("rgb:8080/a4a4/ecec"); setXTermForeground("rgb:0000/0000/0000"); setXTermHighlightBackground("rgb:b1b1/b1b1/b1b1"); @@ -1587,15 +1587,14 @@ void FTerm::finish() putstring (tcap[t_exit_attribute_mode].string); fflush(stdout); } - if ( ! gnome_terminal ) - { - setXTermCursor("rgb:b1b1/b1b1/b1b1"); - resetXTermMouseForeground(); - resetXTermMouseBackground(); - resetXTermCursor(); - resetXTermForeground(); - resetXTermBackground(); - } + + // reset xterm color settings to default + setXTermCursorColor("rgb:b1b1/b1b1/b1b1"); + resetXTermMouseForeground(); + resetXTermMouseBackground(); + resetXTermCursorColor(); + resetXTermForeground(); + resetXTermBackground(); setXTermCursorStyle(fc::steady_block); if ( max_color >= 16 && ! kde_konsole && ! tera_terminal ) @@ -2773,7 +2772,7 @@ void FTerm::setXTermBackground (const FString& bg) } //---------------------------------------------------------------------- -void FTerm::setXTermCursor (const FString& cc) +void FTerm::setXTermCursorColor (const FString& cc) { // Set the text cursor color if ( xterm || mintty_terminal || urxvt_terminal ) @@ -2822,7 +2821,7 @@ void FTerm::resetXTermForeground() // Reset the VT100 text foreground color if ( xterm ) { - putstring("\033]110;\07"); + putstring("\033]110\07"); fflush(stdout); } } @@ -2833,18 +2832,18 @@ void FTerm::resetXTermBackground() // Reset the VT100 text background color if ( xterm ) { - putstring("\033]111;\07"); + putstring("\033]111\07"); fflush(stdout); } } //---------------------------------------------------------------------- -void FTerm::resetXTermCursor() +void FTerm::resetXTermCursorColor() { // Reset the text cursor color if ( xterm ) { - putstring("\033]112;\07"); + putstring("\033]112\07"); fflush(stdout); } } @@ -2855,7 +2854,7 @@ void FTerm::resetXTermMouseForeground() // Reset the mouse foreground color if ( xterm ) { - putstring("\033]113;\07"); + putstring("\033]113\07"); fflush(stdout); } } @@ -2866,7 +2865,7 @@ void FTerm::resetXTermMouseBackground() // Reset the mouse background color if ( xterm ) { - putstring("\033]114;\07"); + putstring("\033]114\07"); fflush(stdout); } } diff --git a/src/fterm.h b/src/fterm.h index bb84817f..11cd14e2 100644 --- a/src/fterm.h +++ b/src/fterm.h @@ -315,13 +315,13 @@ class FTerm static void setXTermTitle (const FString&); static void setXTermForeground (const FString&); static void setXTermBackground (const FString&); - static void setXTermCursor (const FString&); + static void setXTermCursorColor (const FString&); static void setXTermMouseForeground (const FString&); static void setXTermMouseBackground (const FString&); static void setXTermHighlightBackground (const FString&); static void resetXTermForeground(); static void resetXTermBackground(); - static void resetXTermCursor(); + static void resetXTermCursorColor(); static void resetXTermMouseForeground(); static void resetXTermMouseBackground(); static void saveColorMap(); diff --git a/src/ftextview.cpp b/src/ftextview.cpp index 01c94c02..afa56d28 100644 --- a/src/ftextview.cpp +++ b/src/ftextview.cpp @@ -93,6 +93,7 @@ void FTextView::draw() setUpdateVTerm(true); } } + setCursorPos(1,1); updateTerminal(); flush_out(); } diff --git a/src/fwidget.cpp b/src/fwidget.cpp index cfd2e1bc..edceaf09 100644 --- a/src/fwidget.cpp +++ b/src/fwidget.cpp @@ -188,83 +188,85 @@ void FWidget::draw() //---------------------------------------------------------------------- void FWidget::setColorTheme() { - wc.term_fg = fc::Black; - wc.term_bg = fc::LightBlue; - wc.list_fg = fc::Black; - wc.list_bg = fc::White; - wc.selected_list_fg = fc::Cyan; - wc.selected_list_bg = fc::White; - wc.dialog_fg = fc::Black; - wc.dialog_emphasis_fg = fc::Blue; - wc.dialog_bg = fc::White; - wc.error_box_fg = fc::White; - wc.error_box_emphasis_fg = fc::Yellow; - wc.error_box_bg = fc::LightRed; - wc.shadow_fg = fc::Black; - wc.shadow_bg = fc::LightGray; // only for transparent shadow - wc.current_element_focus_fg = fc::White; - wc.current_element_focus_bg = fc::Blue; - wc.current_element_fg = fc::LightGray; - wc.current_element_bg = fc::Blue; - wc.current_inc_search_element_fg = fc::LightRed; - wc.selected_current_element_fg = fc::LightBlue; - wc.selected_current_element_bg = fc::Blue; - wc.label_fg = fc::Black; - wc.label_bg = fc::White; - wc.label_inactive_fg = fc::LightGray; - wc.label_inactive_bg = fc::White; - wc.label_hotkey_fg = fc::Red; - wc.label_hotkey_bg = fc::White; - wc.label_emphasis_fg = fc::Blue; - wc.label_ellipsis_fg = fc::DarkGray; - wc.inputfield_active_focus_fg = fc::White; - wc.inputfield_active_focus_bg = fc::Cyan; - wc.inputfield_active_fg = fc::Black; - wc.inputfield_active_bg = fc::LightGray; - wc.inputfield_inactive_fg = fc::DarkGray; - wc.inputfield_inactive_bg = fc::LightGray; - wc.toggle_button_active_focus_fg = fc::White; - wc.toggle_button_active_focus_bg = fc::Cyan; - wc.toggle_button_active_fg = fc::Black; - wc.toggle_button_active_bg = fc::White; - wc.toggle_button_inactive_fg = fc::LightGray; - wc.toggle_button_inactive_bg = fc::White; - wc.button_active_focus_fg = fc::LightGray; - wc.button_active_focus_bg = fc::Blue; - wc.button_active_fg = fc::LightGray; - wc.button_active_bg = fc::DarkGray; - wc.button_inactive_fg = fc::DarkGray; - wc.button_inactive_bg = fc::LightGray; - wc.button_hotkey_fg = fc::White; - wc.titlebar_active_fg = fc::White; - wc.titlebar_active_bg = fc::Blue; - wc.titlebar_inactive_fg = fc::LightGray; - wc.titlebar_inactive_bg = fc::DarkGray; - wc.titlebar_button_fg = fc::Black; - wc.titlebar_button_bg = fc::LightGray; - wc.menu_active_focus_fg = fc::White; - wc.menu_active_focus_bg = fc::Blue; - wc.menu_active_fg = fc::Black; - wc.menu_active_bg = fc::White; - wc.menu_inactive_fg = fc::LightGray; - wc.menu_inactive_bg = fc::White; - wc.menu_hotkey_fg = fc::Red; - wc.menu_hotkey_bg = fc::White; - wc.statusbar_fg = fc::White; - wc.statusbar_bg = fc::Blue; - wc.statusbar_hotkey_fg = fc::LightRed; - wc.statusbar_hotkey_bg = fc::Blue; - wc.statusbar_separator_fg = fc::Black; - wc.statusbar_active_fg = fc::Blue; - wc.statusbar_active_bg = fc::White; - wc.statusbar_active_hotkey_fg = fc::DarkGray; - wc.statusbar_active_hotkey_bg = fc::White; - wc.scrollbar_fg = fc::DarkGray; - wc.scrollbar_bg = fc::LightBlue; - wc.scrollbar_button_fg = fc::Black; - wc.scrollbar_button_bg = fc::LightGray; - wc.progressbar_fg = fc::DarkGray; - wc.progressbar_bg = fc::LightBlue; + wc.term_fg = fc::Black; + wc.term_bg = fc::LightBlue; + wc.list_fg = fc::Black; + wc.list_bg = fc::White; + wc.selected_list_fg = fc::Cyan; + wc.selected_list_bg = fc::White; + wc.dialog_fg = fc::Black; + wc.dialog_emphasis_fg = fc::Blue; + wc.dialog_bg = fc::White; + wc.error_box_fg = fc::White; + wc.error_box_emphasis_fg = fc::Yellow; + wc.error_box_bg = fc::LightRed; + wc.shadow_fg = fc::Black; + wc.shadow_bg = fc::LightGray; // only for transparent shadow + wc.current_element_focus_fg = fc::White; + wc.current_element_focus_bg = fc::Blue; + wc.current_element_fg = fc::LightGray; + wc.current_element_bg = fc::Blue; + wc.current_inc_search_element_fg = fc::LightRed; + wc.selected_current_element_focus_fg = fc::LightBlue; + wc.selected_current_element_focus_bg = fc::Blue; + wc.selected_current_element_fg = fc::Cyan; + wc.selected_current_element_bg = fc::Blue; + wc.label_fg = fc::Black; + wc.label_bg = fc::White; + wc.label_inactive_fg = fc::LightGray; + wc.label_inactive_bg = fc::White; + wc.label_hotkey_fg = fc::Red; + wc.label_hotkey_bg = fc::White; + wc.label_emphasis_fg = fc::Blue; + wc.label_ellipsis_fg = fc::DarkGray; + wc.inputfield_active_focus_fg = fc::White; + wc.inputfield_active_focus_bg = fc::Cyan; + wc.inputfield_active_fg = fc::Black; + wc.inputfield_active_bg = fc::LightGray; + wc.inputfield_inactive_fg = fc::DarkGray; + wc.inputfield_inactive_bg = fc::LightGray; + wc.toggle_button_active_focus_fg = fc::White; + wc.toggle_button_active_focus_bg = fc::Cyan; + wc.toggle_button_active_fg = fc::Black; + wc.toggle_button_active_bg = fc::White; + wc.toggle_button_inactive_fg = fc::LightGray; + wc.toggle_button_inactive_bg = fc::White; + wc.button_active_focus_fg = fc::LightGray; + wc.button_active_focus_bg = fc::Blue; + wc.button_active_fg = fc::LightGray; + wc.button_active_bg = fc::DarkGray; + wc.button_inactive_fg = fc::DarkGray; + wc.button_inactive_bg = fc::LightGray; + wc.button_hotkey_fg = fc::White; + wc.titlebar_active_fg = fc::White; + wc.titlebar_active_bg = fc::Blue; + wc.titlebar_inactive_fg = fc::LightGray; + wc.titlebar_inactive_bg = fc::DarkGray; + wc.titlebar_button_fg = fc::Black; + wc.titlebar_button_bg = fc::LightGray; + wc.menu_active_focus_fg = fc::White; + wc.menu_active_focus_bg = fc::Blue; + wc.menu_active_fg = fc::Black; + wc.menu_active_bg = fc::White; + wc.menu_inactive_fg = fc::LightGray; + wc.menu_inactive_bg = fc::White; + wc.menu_hotkey_fg = fc::Red; + wc.menu_hotkey_bg = fc::White; + wc.statusbar_fg = fc::White; + wc.statusbar_bg = fc::Blue; + wc.statusbar_hotkey_fg = fc::LightRed; + wc.statusbar_hotkey_bg = fc::Blue; + wc.statusbar_separator_fg = fc::Black; + wc.statusbar_active_fg = fc::Blue; + wc.statusbar_active_bg = fc::White; + wc.statusbar_active_hotkey_fg = fc::DarkGray; + wc.statusbar_active_hotkey_bg = fc::White; + wc.scrollbar_fg = fc::DarkGray; + wc.scrollbar_bg = fc::LightBlue; + wc.scrollbar_button_fg = fc::Black; + wc.scrollbar_button_bg = fc::LightGray; + wc.progressbar_fg = fc::DarkGray; + wc.progressbar_bg = fc::LightBlue; if ( kde_konsole ) wc.term_bg = fc::SteelBlue3; @@ -274,83 +276,85 @@ void FWidget::setColorTheme() if ( max_color < 16 ) // for 8 color mode { - wc.term_fg = fc::Black; - wc.term_bg = fc::Blue; - wc.list_fg = fc::Black; - wc.list_bg = fc::LightGray; - wc.selected_list_fg = fc::Blue; - wc.selected_list_bg = fc::LightGray; - wc.dialog_fg = fc::Black; - wc.dialog_emphasis_fg = fc::Blue; - wc.dialog_bg = fc::LightGray; - wc.error_box_fg = fc::Black; - wc.error_box_emphasis_fg = fc::Red; - wc.error_box_bg = fc::LightGray; - wc.shadow_fg = fc::Black; - wc.shadow_bg = fc::LightGray; // only for transparent shadow - wc.current_element_focus_fg = fc::LightGray; - wc.current_element_focus_bg = fc::Red; - wc.current_element_fg = fc::LightGray; - wc.current_element_bg = fc::Blue; - wc.current_inc_search_element_fg = fc::Red; - wc.selected_current_element_fg = fc::Blue; - wc.selected_current_element_bg = fc::Red; - wc.label_fg = fc::Black; - wc.label_bg = fc::LightGray; - wc.label_inactive_fg = fc::Cyan; - wc.label_inactive_bg = fc::LightGray; - wc.label_hotkey_fg = fc::Red; - wc.label_hotkey_bg = fc::LightGray; - wc.label_emphasis_fg = fc::Blue; - wc.label_ellipsis_fg = fc::Black; - wc.inputfield_active_focus_fg = fc::LightGray; - wc.inputfield_active_focus_bg = fc::Blue; - wc.inputfield_active_fg = fc::Black; - wc.inputfield_active_bg = fc::Cyan; - wc.inputfield_inactive_fg = fc::Black; - wc.inputfield_inactive_bg = fc::LightGray; - wc.toggle_button_active_focus_fg = fc::LightGray; - wc.toggle_button_active_focus_bg = fc::Red; - wc.toggle_button_active_fg = fc::Black; - wc.toggle_button_active_bg = fc::LightGray; - wc.toggle_button_inactive_fg = fc::Cyan; - wc.toggle_button_inactive_bg = fc::LightGray; - wc.button_active_focus_fg = fc::LightGray; - wc.button_active_focus_bg = fc::Red; - wc.button_active_fg = fc::LightGray; - wc.button_active_bg = fc::Blue; - wc.button_inactive_fg = fc::Black; - wc.button_inactive_bg = fc::Blue; - wc.button_hotkey_fg = fc::LightGray; - wc.titlebar_active_fg = fc::LightGray; - wc.titlebar_active_bg = fc::Red; - wc.titlebar_inactive_fg = fc::Black; - wc.titlebar_inactive_bg = fc::LightGray; - wc.titlebar_button_fg = fc::Black; - wc.titlebar_button_bg = fc::LightGray; - wc.menu_active_focus_fg = fc::LightGray; - wc.menu_active_focus_bg = fc::Blue; - wc.menu_active_fg = fc::Black; - wc.menu_active_bg = fc::LightGray; - wc.menu_inactive_fg = fc::Cyan; - wc.menu_inactive_bg = fc::LightGray; - wc.menu_hotkey_fg = fc::Red; - wc.menu_hotkey_bg = fc::LightGray; - wc.statusbar_fg = fc::Black; - wc.statusbar_bg = fc::LightGray; - wc.statusbar_hotkey_fg = fc::Red; - wc.statusbar_hotkey_bg = fc::LightGray; - wc.statusbar_separator_fg = fc::Black; - wc.statusbar_active_fg = fc::LightGray; - wc.statusbar_active_bg = fc::Black; - wc.statusbar_active_hotkey_fg = fc::Red; - wc.statusbar_active_hotkey_bg = fc::Black; - wc.scrollbar_fg = fc::Black; - wc.scrollbar_bg = fc::LightGray; - wc.scrollbar_button_fg = fc::Black; - wc.scrollbar_button_bg = fc::LightGray; - wc.progressbar_fg = fc::Blue; - wc.progressbar_bg = fc::LightGray; + wc.term_fg = fc::Black; + wc.term_bg = fc::Blue; + wc.list_fg = fc::Black; + wc.list_bg = fc::LightGray; + wc.selected_list_fg = fc::Blue; + wc.selected_list_bg = fc::LightGray; + wc.dialog_fg = fc::Black; + wc.dialog_emphasis_fg = fc::Blue; + wc.dialog_bg = fc::LightGray; + wc.error_box_fg = fc::Black; + wc.error_box_emphasis_fg = fc::Red; + wc.error_box_bg = fc::LightGray; + wc.shadow_fg = fc::Black; + wc.shadow_bg = fc::LightGray; // only for transparent shadow + wc.current_element_focus_fg = fc::LightGray; + wc.current_element_focus_bg = fc::Red; + wc.current_element_fg = fc::LightGray; + wc.current_element_bg = fc::Blue; + wc.current_inc_search_element_fg = fc::Brown; + wc.selected_current_element_focus_fg = fc::Blue; + wc.selected_current_element_focus_bg = fc::Red; + wc.selected_current_element_fg = fc::Cyan; + wc.selected_current_element_bg = fc::Blue; + wc.label_fg = fc::Black; + wc.label_bg = fc::LightGray; + wc.label_inactive_fg = fc::Cyan; + wc.label_inactive_bg = fc::LightGray; + wc.label_hotkey_fg = fc::Red; + wc.label_hotkey_bg = fc::LightGray; + wc.label_emphasis_fg = fc::Blue; + wc.label_ellipsis_fg = fc::Black; + wc.inputfield_active_focus_fg = fc::LightGray; + wc.inputfield_active_focus_bg = fc::Blue; + wc.inputfield_active_fg = fc::Black; + wc.inputfield_active_bg = fc::Cyan; + wc.inputfield_inactive_fg = fc::Black; + wc.inputfield_inactive_bg = fc::LightGray; + wc.toggle_button_active_focus_fg = fc::LightGray; + wc.toggle_button_active_focus_bg = fc::Red; + wc.toggle_button_active_fg = fc::Black; + wc.toggle_button_active_bg = fc::LightGray; + wc.toggle_button_inactive_fg = fc::Cyan; + wc.toggle_button_inactive_bg = fc::LightGray; + wc.button_active_focus_fg = fc::LightGray; + wc.button_active_focus_bg = fc::Red; + wc.button_active_fg = fc::LightGray; + wc.button_active_bg = fc::Blue; + wc.button_inactive_fg = fc::Black; + wc.button_inactive_bg = fc::Blue; + wc.button_hotkey_fg = fc::LightGray; + wc.titlebar_active_fg = fc::LightGray; + wc.titlebar_active_bg = fc::Red; + wc.titlebar_inactive_fg = fc::Black; + wc.titlebar_inactive_bg = fc::LightGray; + wc.titlebar_button_fg = fc::Black; + wc.titlebar_button_bg = fc::LightGray; + wc.menu_active_focus_fg = fc::LightGray; + wc.menu_active_focus_bg = fc::Blue; + wc.menu_active_fg = fc::Black; + wc.menu_active_bg = fc::LightGray; + wc.menu_inactive_fg = fc::Cyan; + wc.menu_inactive_bg = fc::LightGray; + wc.menu_hotkey_fg = fc::Red; + wc.menu_hotkey_bg = fc::LightGray; + wc.statusbar_fg = fc::Black; + wc.statusbar_bg = fc::LightGray; + wc.statusbar_hotkey_fg = fc::Red; + wc.statusbar_hotkey_bg = fc::LightGray; + wc.statusbar_separator_fg = fc::Black; + wc.statusbar_active_fg = fc::LightGray; + wc.statusbar_active_bg = fc::Black; + wc.statusbar_active_hotkey_fg = fc::Red; + wc.statusbar_active_hotkey_bg = fc::Black; + wc.scrollbar_fg = fc::Black; + wc.scrollbar_bg = fc::LightGray; + wc.scrollbar_button_fg = fc::Black; + wc.scrollbar_button_bg = fc::LightGray; + wc.progressbar_fg = fc::Blue; + wc.progressbar_bg = fc::LightGray; } } diff --git a/src/fwidget.h b/src/fwidget.h index 5973bc3b..d0681f26 100644 --- a/src/fwidget.h +++ b/src/fwidget.h @@ -152,6 +152,8 @@ class FWidget : public FObject, public FTerm uChar current_element_fg; uChar current_element_bg; uChar current_inc_search_element_fg; + uChar selected_current_element_focus_fg; + uChar selected_current_element_focus_bg; uChar selected_current_element_fg; uChar selected_current_element_bg; uChar label_fg;