hrev44956 adds 1 changeset to branch 'master' old head: a2b5d15aef1cb3beaacf33973c1007a237d596f6 new head: 7271621fbe58529985108223858deb3676e9589a overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=7271621+%5Ea2b5d15 ---------------------------------------------------------------------------- 7271621: Terminal: Spice up terminal color scheme selection [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44956 Commit: 7271621fbe58529985108223858deb3676e9589a URL: http://cgit.haiku-os.org/haiku/commit/?id=7271621 Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> Date: Tue Dec 4 16:58:30 2012 UTC ---------------------------------------------------------------------------- 2 files changed, 49 insertions(+), 12 deletions(-) src/apps/terminal/Colors.cpp | 58 ++++++++++++++++++++++++++++++++-------- src/apps/terminal/Colors.h | 3 ++- ---------------------------------------------------------------------------- diff --git a/src/apps/terminal/Colors.cpp b/src/apps/terminal/Colors.cpp index a10fff6..8ba5682 100644 --- a/src/apps/terminal/Colors.cpp +++ b/src/apps/terminal/Colors.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010, Haiku, Inc. + * Copyright 2010-2012, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ + #include "Colors.h" #include <Catalog.h> @@ -12,12 +13,15 @@ #define B_TRANSLATION_CONTEXT "Terminal colors schema" +// Standard colors 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 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, kWhite, kWhite, @@ -26,9 +30,18 @@ const struct color_schema kBlackOnWhite = { 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 = { - B_TRANSLATE("White on Black"), +const struct color_schema kColorMidnight = { + B_TRANSLATE("Midnight"), kWhite, kBlack, kBlack, @@ -37,8 +50,18 @@ const struct color_schema kWhiteOnBlack = { kWhite }; -const struct color_schema kGreenOnBlack = { - B_TRANSLATE("Green on Black"), +const struct color_schema kColorProfessional = { + 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, kBlack, kBlack, @@ -47,14 +70,27 @@ const struct color_schema kGreenOnBlack = { 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 = { B_TRANSLATE("Custom") }; const color_schema* gPredefinedSchemas[] = { - &kBlackOnWhite, - &kWhiteOnBlack, - &kGreenOnBlack, + &kColorDefault, + &kColorBlue, + &kColorMidnight, + &kColorProfessional, + &kColorRetroTerminal, + &kColorSlate, &gCustomSchema, NULL }; diff --git a/src/apps/terminal/Colors.h b/src/apps/terminal/Colors.h index dcac607..5c7fef4 100644 --- a/src/apps/terminal/Colors.h +++ b/src/apps/terminal/Colors.h @@ -1,10 +1,11 @@ /* - * Copyright 2010, Haiku, Inc. + * Copyright 2010-2012, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef _COLORS_H #define _COLORS_H + #include <InterfaceDefs.h> struct color_schema {