mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "cmCursesColor.h"
|
||||
#include "cmCursesForm.h"
|
||||
#include "cmCursesMainForm.h"
|
||||
#include "cmCursesStandardIncludes.h"
|
||||
@@ -21,8 +22,13 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left,
|
||||
{
|
||||
this->InEdit = false;
|
||||
this->Type = cmStateEnums::STRING;
|
||||
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::String));
|
||||
set_field_back(this->Field, COLOR_PAIR(cmCursesColor::String));
|
||||
} else {
|
||||
set_field_fore(this->Field, A_NORMAL);
|
||||
set_field_back(this->Field, A_STANDOUT);
|
||||
}
|
||||
field_opts_off(this->Field, O_STATIC);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user