diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2019-10-27 17:25:41 (GMT) |
---|---|---|
committer | Sylvain Joubert <joubert.sy@gmail.com> | 2019-11-04 17:59:20 (GMT) |
commit | 93b66735ac2092675eec7a636625df84ff306fdc (patch) | |
tree | b58c050ad714fa7ea5467f90d26873e764bfa7ea /Source/CursesDialog/cmCursesOptionsWidget.cxx | |
parent | dbd14ecacf9b85dcdf5f566538167261dba224fe (diff) | |
download | CMake-93b66735ac2092675eec7a636625df84ff306fdc.zip CMake-93b66735ac2092675eec7a636625df84ff306fdc.tar.gz CMake-93b66735ac2092675eec7a636625df84ff306fdc.tar.bz2 |
ccmake: Use type-based colors to display cache values
The colors are based on the entry type (or value for booleans),
paths and filepaths sharing the same color.
Diffstat (limited to 'Source/CursesDialog/cmCursesOptionsWidget.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesOptionsWidget.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index eb773ad..a15241f 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCursesOptionsWidget.h" +#include "cmCursesColor.h" #include "cmCursesWidget.h" #include "cmStateTypes.h" @@ -15,8 +16,13 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left, // there is no option type, and string type causes ccmake to cast // the widget into a string widget at some point. BOOL is safe for // now. - set_field_fore(this->Field, A_NORMAL); - set_field_back(this->Field, A_STANDOUT); + if (cmCursesColor::HasColors()) { + set_field_fore(this->Field, COLOR_PAIR(cmCursesColor::Options)); + set_field_back(this->Field, COLOR_PAIR(cmCursesColor::Options)); + } else { + set_field_fore(this->Field, A_NORMAL); + set_field_back(this->Field, A_STANDOUT); + } field_opts_off(this->Field, O_STATIC); } |