diff --git a/apps/code/base.de.i18n b/apps/code/base.de.i18n index 5879c5745..1d9f39cc5 100644 --- a/apps/code/base.de.i18n +++ b/apps/code/base.de.i18n @@ -6,3 +6,6 @@ AutoImportScript = "Automatischer Import in Konsole" DeleteScript = "Skript löschen" FunctionsAndVariables = "Funktionen und Variablen" AllowedCharactersaz09 = "Erlaubte Zeichen: a-z, 0-9, _" +CurrentScript = "Current script" +BuiltinFunctionsAndKeyWords = "Builtin functions and keywords" +ImportedModulesAndScripts = "Imported modules and scripts" diff --git a/apps/code/base.en.i18n b/apps/code/base.en.i18n index 8bf1e3c9f..266221a70 100644 --- a/apps/code/base.en.i18n +++ b/apps/code/base.en.i18n @@ -6,3 +6,6 @@ AutoImportScript = "Auto import in shell" DeleteScript = "Delete script" FunctionsAndVariables = "Functions and variables" AllowedCharactersaz09 = "Allowed characters: a-z, 0-9, _" +CurrentScript = "Current script" +BuiltinFunctionsAndKeyWords = "Builtin functions and keywords" +ImportedModulesAndScripts = "Imported modules and scripts" diff --git a/apps/code/base.es.i18n b/apps/code/base.es.i18n index 4e4860fe4..cbd4b8859 100644 --- a/apps/code/base.es.i18n +++ b/apps/code/base.es.i18n @@ -6,3 +6,6 @@ AutoImportScript = "Importación auto en intérprete" DeleteScript = "Eliminar el archivo" FunctionsAndVariables = "Funciones y variables" AllowedCharactersaz09 = "Caracteres permitidos : a-z, 0-9, _" +CurrentScript = "Current script" +BuiltinFunctionsAndKeyWords = "Builtin functions and keywords" +ImportedModulesAndScripts = "Imported modules and scripts" diff --git a/apps/code/base.fr.i18n b/apps/code/base.fr.i18n index 253989ab2..2dd179d22 100644 --- a/apps/code/base.fr.i18n +++ b/apps/code/base.fr.i18n @@ -6,3 +6,6 @@ AutoImportScript = "Importation auto dans la console" DeleteScript = "Supprimer le script" FunctionsAndVariables = "Fonctions et variables" AllowedCharactersaz09 = "Caractères autorisés : a-z, 0-9, _" +CurrentScript = "Script en cours" +BuiltinFunctionsAndKeyWords = "Fonctions natives et mots-clés" +ImportedModulesAndScripts = "Modules et scripts importés" diff --git a/apps/code/base.pt.i18n b/apps/code/base.pt.i18n index d44da5a19..4dd8066d3 100644 --- a/apps/code/base.pt.i18n +++ b/apps/code/base.pt.i18n @@ -6,3 +6,6 @@ AutoImportScript = "Importação auto no interpretador" DeleteScript = "Eliminar o script" FunctionsAndVariables = "Funções e variáveis" AllowedCharactersaz09 = "Caracteres permitidos : a-z, 0-9, _" +CurrentScript = "Current script" +BuiltinFunctionsAndKeyWords = "Builtin functions and keywords" +ImportedModulesAndScripts = "Imported modules and scripts" diff --git a/apps/code/editor_view.cpp b/apps/code/editor_view.cpp index 2685fa5fb..0af73b613 100644 --- a/apps/code/editor_view.cpp +++ b/apps/code/editor_view.cpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace Code { @@ -56,7 +57,7 @@ void EditorView::layoutSubviews(bool force) { /* EditorView::GutterView */ void EditorView::GutterView::drawRect(KDContext * ctx, KDRect rect) const { - KDColor textColor = KDColor::RGB24(0x919EA4); + KDColor textColor = Palette::BlueishGrey; KDColor backgroundColor = KDColor::RGB24(0xE4E6E7); ctx->fillRect(rect, backgroundColor); diff --git a/apps/code/variable_box_controller.cpp b/apps/code/variable_box_controller.cpp index 06003bb26..89ed28d3d 100644 --- a/apps/code/variable_box_controller.cpp +++ b/apps/code/variable_box_controller.cpp @@ -56,6 +56,16 @@ VariableBoxController::VariableBoxController(ScriptStore * scriptStore) : for (int i = 0; i < k_maxNumberOfDisplayedRows; i++) { m_leafCells[i].setScriptStore(scriptStore); } + I18n::Message subtitleMessages[k_scriptOriginsCount] = { + I18n::Message::CurrentScript, + I18n::Message::BuiltinFunctionsAndKeyWords, + I18n::Message::ImportedModulesAndScripts + }; + for (int i = 0; i < k_scriptOriginsCount; i++) { + m_subtitleCells[i].setEven(true); + m_subtitleCells[i].setAlignment(0.0f, 0.5f); + m_subtitleCells[i].setMessage(subtitleMessages[i], Palette::BlueishGrey); + } } bool VariableBoxController::handleEvent(Ion::Events::Event event) { diff --git a/apps/code/variable_box_controller.h b/apps/code/variable_box_controller.h index 941883cca..bd5eae0bf 100644 --- a/apps/code/variable_box_controller.h +++ b/apps/code/variable_box_controller.h @@ -37,6 +37,7 @@ private: constexpr static int k_maxNumberOfDisplayedRows = 6; // 240/40 constexpr static int k_maxScriptNodesCount = 32; //TODO LEA constexpr static int k_totalBuiltinNodesCount = 98; + constexpr static uint8_t k_scriptOriginsCount = 3; enum class NodeOrigin : uint8_t { CurrentScript, Builtins, @@ -98,6 +99,7 @@ private: ScriptNode m_builtinNodes[k_totalBuiltinNodesCount]; ScriptNode m_importedNodes[k_maxScriptNodesCount]; ScriptNodeCell m_leafCells[k_maxNumberOfDisplayedRows]; + EvenOddMessageTextCell m_subtitleCells[k_scriptOriginsCount]; ScriptStore * m_scriptStore; // TODO LEA Put these in an array? int m_currentScriptNodesCount; diff --git a/escher/include/escher/palette.h b/escher/include/escher/palette.h index 0ebc550a7..ccc965a5d 100644 --- a/escher/include/escher/palette.h +++ b/escher/include/escher/palette.h @@ -33,6 +33,7 @@ public: constexpr static KDColor GreenLight = KDColor::RGB24(0x52db8f); constexpr static KDColor Brown = KDColor::RGB24(0x8d7350); constexpr static KDColor Purple = KDColor::RGB24(0x6e2d79); + constexpr static KDColor BlueishGrey = KDColor::RGB24(0x919ea4); constexpr static KDColor DataColor[] = {Red, Blue, Green, YellowDark, Magenta, Turquoise, Pink, Orange}; constexpr static KDColor DataColorLight[] = {RedLight, BlueLight, GreenLight, YellowLight}; diff --git a/escher/src/palette.cpp b/escher/src/palette.cpp index 2d6e91145..9d96af6d7 100644 --- a/escher/src/palette.cpp +++ b/escher/src/palette.cpp @@ -28,6 +28,7 @@ constexpr KDColor Palette::Green; constexpr KDColor Palette::GreenLight; constexpr KDColor Palette::Brown; constexpr KDColor Palette::Purple; +constexpr KDColor Palette::BlueishGrey; constexpr KDColor Palette::DataColor[]; constexpr KDColor Palette::DataColorLight[];