Terminal: Spice up terminal color scheme selection

This commit is contained in:
Alexander von Gluck IV
2012-12-04 17:07:35 +00:00
parent a2b5d15aef
commit 7271621fbe
2 changed files with 49 additions and 12 deletions
+47 -11
View File
@@ -1,8 +1,9 @@
/* /*
* Copyright 2010, Haiku, Inc. * Copyright 2010-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#include "Colors.h" #include "Colors.h"
#include <Catalog.h> #include <Catalog.h>
@@ -12,12 +13,15 @@
#define B_TRANSLATION_CONTEXT "Terminal colors schema" #define B_TRANSLATION_CONTEXT "Terminal colors schema"
// Standard colors
const rgb_color kBlack= { 0, 0, 0, 255 }; const rgb_color kBlack= { 0, 0, 0, 255 };
const rgb_color kWhite = { 255, 255, 255, 255 };
const rgb_color kGreen = { 0, 255, 0, 255 }; const rgb_color kGreen = { 0, 255, 0, 255 };
const rgb_color kWhite = { 255, 255, 255, 255 };
const rgb_color kYellow = { 255, 255, 0, 255 };
const struct color_schema kBlackOnWhite = {
B_TRANSLATE("Black on White"), const struct color_schema kColorDefault = {
B_TRANSLATE("Default"),
kBlack, kBlack,
kWhite, kWhite,
kWhite, kWhite,
@@ -26,9 +30,18 @@ const struct color_schema kBlackOnWhite = {
kBlack kBlack
}; };
const struct color_schema kColorBlue = {
B_TRANSLATE("Blue"),
kYellow,
{ 0, 0, 139, 255 },
kBlack,
kWhite,
kBlack,
{ 0, 139, 139, 255 },
};
const struct color_schema kWhiteOnBlack = { const struct color_schema kColorMidnight = {
B_TRANSLATE("White on Black"), B_TRANSLATE("Midnight"),
kWhite, kWhite,
kBlack, kBlack,
kBlack, kBlack,
@@ -37,8 +50,18 @@ const struct color_schema kWhiteOnBlack = {
kWhite kWhite
}; };
const struct color_schema kGreenOnBlack = { const struct color_schema kColorProfessional = {
B_TRANSLATE("Green on Black"), B_TRANSLATE("Professional"),
kWhite,
{ 8, 8, 8, 255 },
{ 50, 50, 50, 255 },
kWhite,
kWhite,
{ 50, 50, 50, 255 },
};
const struct color_schema kColorRetroTerminal = {
B_TRANSLATE("Retro Terminal"),
kGreen, kGreen,
kBlack, kBlack,
kBlack, kBlack,
@@ -47,14 +70,27 @@ const struct color_schema kGreenOnBlack = {
kGreen kGreen
}; };
const struct color_schema kColorSlate = {
B_TRANSLATE("Slate"),
kWhite,
{ 20, 20, 28, 255 },
{ 70, 70, 70, 255 },
{ 255, 200, 0, 255 },
kWhite,
{ 70, 70, 70, 255 },
};
struct color_schema gCustomSchema = { struct color_schema gCustomSchema = {
B_TRANSLATE("Custom") B_TRANSLATE("Custom")
}; };
const color_schema* gPredefinedSchemas[] = { const color_schema* gPredefinedSchemas[] = {
&kBlackOnWhite, &kColorDefault,
&kWhiteOnBlack, &kColorBlue,
&kGreenOnBlack, &kColorMidnight,
&kColorProfessional,
&kColorRetroTerminal,
&kColorSlate,
&gCustomSchema, &gCustomSchema,
NULL NULL
}; };
+2 -1
View File
@@ -1,10 +1,11 @@
/* /*
* Copyright 2010, Haiku, Inc. * Copyright 2010-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _COLORS_H #ifndef _COLORS_H
#define _COLORS_H #define _COLORS_H
#include <InterfaceDefs.h> #include <InterfaceDefs.h>
struct color_schema { struct color_schema {