Merge pull request #251 from nsanmartin/high-intensity-colors
Add high-intensity colors option and cli flag.
This commit is contained in:
@@ -110,6 +110,14 @@ insertions tagged with "mh 2016-03-29" and "mh 2016-06-11" come from the latest
|
|||||||
with no other target defined, use the bookmark page for startup
|
with no other target defined, use the bookmark page for startup
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt>
|
||||||
|
-H
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
use high-intensity colors
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
-M
|
-M
|
||||||
</dt>
|
</dt>
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ may take an argument.
|
|||||||
\fB\-B\fP
|
\fB\-B\fP
|
||||||
with no other target defined, use the bookmark page for startup
|
with no other target defined, use the bookmark page for startup
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-H\fP
|
||||||
|
use high-intensity colors
|
||||||
|
.TP
|
||||||
\fB\-M\fP
|
\fB\-M\fP
|
||||||
monochrome display
|
monochrome display
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -958,6 +958,7 @@ global int override_user_agent init(FALSE);
|
|||||||
|
|
||||||
#ifdef USE_COLOR
|
#ifdef USE_COLOR
|
||||||
global int useColor init(TRUE);
|
global int useColor init(TRUE);
|
||||||
|
global int highIntensityColors init(FALSE);
|
||||||
global int basic_color init(8); /* don't change */
|
global int basic_color init(8); /* don't change */
|
||||||
global int anchor_color init(4); /* blue */
|
global int anchor_color init(4); /* blue */
|
||||||
global int image_color init(2); /* green */
|
global int image_color init(2); /* green */
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ fusage(FILE * f, int err)
|
|||||||
fprintf(f, " -v visual startup mode\n");
|
fprintf(f, " -v visual startup mode\n");
|
||||||
#ifdef USE_COLOR
|
#ifdef USE_COLOR
|
||||||
fprintf(f, " -M monochrome display\n");
|
fprintf(f, " -M monochrome display\n");
|
||||||
|
fprintf(f, " -H use high-intensity colors\n");
|
||||||
#endif /* USE_COLOR */
|
#endif /* USE_COLOR */
|
||||||
fprintf(f,
|
fprintf(f,
|
||||||
" -N open URL of command line on each new tab\n");
|
" -N open URL of command line on each new tab\n");
|
||||||
@@ -631,6 +632,8 @@ main(int argc, char **argv)
|
|||||||
#ifdef USE_COLOR
|
#ifdef USE_COLOR
|
||||||
else if (!strcmp("-M", argv[i]))
|
else if (!strcmp("-M", argv[i]))
|
||||||
useColor = FALSE;
|
useColor = FALSE;
|
||||||
|
else if (!strcmp("-H", argv[i]))
|
||||||
|
highIntensityColors = TRUE;
|
||||||
#endif /* USE_COLOR */
|
#endif /* USE_COLOR */
|
||||||
else if (!strcmp("-B", argv[i]))
|
else if (!strcmp("-B", argv[i]))
|
||||||
load_bookmark = TRUE;
|
load_bookmark = TRUE;
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ static int OptionEncode = FALSE;
|
|||||||
#define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA")
|
#define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA")
|
||||||
#define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element")
|
#define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element")
|
||||||
#define CMT_COLOR N_("Display with color")
|
#define CMT_COLOR N_("Display with color")
|
||||||
|
#define CMT_HINTENSITY_COLOR N_("Use high-intensity colors")
|
||||||
#define CMT_B_COLOR N_("Color of normal character")
|
#define CMT_B_COLOR N_("Color of normal character")
|
||||||
#define CMT_A_COLOR N_("Color of anchor")
|
#define CMT_A_COLOR N_("Color of anchor")
|
||||||
#define CMT_I_COLOR N_("Color of image link")
|
#define CMT_I_COLOR N_("Color of image link")
|
||||||
@@ -469,6 +470,7 @@ struct param_ptr params1[] = {
|
|||||||
#ifdef USE_COLOR
|
#ifdef USE_COLOR
|
||||||
struct param_ptr params2[] = {
|
struct param_ptr params2[] = {
|
||||||
{"color", P_INT, PI_ONOFF, (void *)&useColor, CMT_COLOR, NULL},
|
{"color", P_INT, PI_ONOFF, (void *)&useColor, CMT_COLOR, NULL},
|
||||||
|
{"high-intensity", P_INT, PI_ONOFF, (void *)&highIntensityColors, CMT_HINTENSITY_COLOR, NULL},
|
||||||
{"basic_color", P_COLOR, PI_SEL_C, (void *)&basic_color, CMT_B_COLOR,
|
{"basic_color", P_COLOR, PI_SEL_C, (void *)&basic_color, CMT_B_COLOR,
|
||||||
(void *)colorstr},
|
(void *)colorstr},
|
||||||
{"anchor_color", P_COLOR, PI_SEL_C, (void *)&anchor_color, CMT_A_COLOR,
|
{"anchor_color", P_COLOR, PI_SEL_C, (void *)&anchor_color, CMT_A_COLOR,
|
||||||
|
|||||||
@@ -1678,7 +1678,7 @@ static char *
|
|||||||
color_seq(int colmode)
|
color_seq(int colmode)
|
||||||
{
|
{
|
||||||
static char seqbuf[32];
|
static char seqbuf[32];
|
||||||
sprintf(seqbuf, "\033[%dm", ((colmode >> 8) & 7) + 30);
|
sprintf(seqbuf, "\033[%dm", ((colmode >> 8) & 7) + (highIntensityColors ? 90 : 30));
|
||||||
return seqbuf;
|
return seqbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user