From 9a86ed21f5547384da45d9470976508ec880d721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Ero=C4=9Flu?= Date: Sun, 11 Oct 2020 17:38:27 +0300 Subject: [PATCH] Added red theme. --- README.md | 7 +- frontend/components/FileTabs/css/FileTabs.css | 4 +- plugins/theme_red/config.py | 14 + plugins/theme_red/frontend/css/theme_red.css | 263 ++++++++++++++++++ .../theme_red/frontend/html/theme_red.html | 0 plugins/theme_red/frontend/js/theme_red.js | 14 + plugins/theme_red/theme_red.py | 25 ++ plugins/theme_red/urls.py | 12 + 8 files changed, 334 insertions(+), 5 deletions(-) create mode 100644 plugins/theme_red/config.py create mode 100644 plugins/theme_red/frontend/css/theme_red.css create mode 100644 plugins/theme_red/frontend/html/theme_red.html create mode 100644 plugins/theme_red/frontend/js/theme_red.js create mode 100644 plugins/theme_red/theme_red.py create mode 100644 plugins/theme_red/urls.py diff --git a/README.md b/README.md index ce2abfe..d361687 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ GDBFrontend's GDB commands starts with `gf-`. Refreshes all browser clients. #### `gf-theme [theme-name]` -Switch to desired theme. For example: `gf-theme light` or `gf-theme default` for default theme. +Switch to desired theme. For example: `gf-theme light`, `gf-theme red` or `gf-theme default` for default theme. #### `gf-list-plugins` Lists all GDBFrontend plugins in the plugin directory. @@ -177,7 +177,7 @@ For example, you can get all client sockets like this: or you can get all plugins: ```python >>> gdbfrontend.plugin.getAll() -['hello', 'theme_light'] +['hello', 'theme_light', 'theme_red'] ``` ## Security with Sharing Sessions @@ -232,6 +232,9 @@ API Documentation is TODO yet. ## Plugin Development You can read the [Plugin Development Tutorial](https://github.com/rohanrhu/gdb-frontend/wiki/Plugin-Development-Tutorial). +## Theme Development +Themes are developed as plugins. + ## Contributing You can contribute with commiting to project or developing a plugin. All commits are welcome. diff --git a/frontend/components/FileTabs/css/FileTabs.css b/frontend/components/FileTabs/css/FileTabs.css index 13b16c1..7e4119d 100644 --- a/frontend/components/FileTabs/css/FileTabs.css +++ b/frontend/components/FileTabs/css/FileTabs.css @@ -35,9 +35,7 @@ display: flex; flex: 0; min-height: 20px; - border: 1px solid rgba(163, 163, 163, 0.05); - border-bottom: 0px; - border-top: 0px; + border-right: 1px solid rgba(163, 163, 163, 0.1); cursor: pointer; position: relative; } diff --git a/plugins/theme_red/config.py b/plugins/theme_red/config.py new file mode 100644 index 0000000..a886735 --- /dev/null +++ b/plugins/theme_red/config.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# +# gdb-frontend is a easy, flexible and extensionable gui debugger +# +# https://github.com/rohanrhu/gdb-frontend +# https://oguzhaneroglu.com/projects/gdb-frontend/ +# +# Licensed under GNU/GPLv3 +# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) + +DESCRIPTION = "Red theme for GDBFrontend." +AUTHOR = "Oğuzhan Eroğlu (https://oguzhaneroglu.com/)" +HOMEPAGE = "https://github.com/rohanrhu/gdb-frontend" +VERSION = [0, 0, 1] \ No newline at end of file diff --git a/plugins/theme_red/frontend/css/theme_red.css b/plugins/theme_red/frontend/css/theme_red.css new file mode 100644 index 0000000..d3b14bb --- /dev/null +++ b/plugins/theme_red/frontend/css/theme_red.css @@ -0,0 +1,263 @@ +/* + * gdb-frontend is a easy, flexible and extensionable gui debugger + * + * https://github.com/rohanrhu/gdb-frontend + * https://oguzhaneroglu.com/projects/gdb-frontend/ + * + * Licensed under GNU/GPLv3 + * Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) + * + */ + +.GDBFrontend { + background: white; + color: white; +} + +.Checkbox_icon_img { + filter: contrast(10) invert(1); +} + +.button1 { + background: rgba(255, 255, 255, 0.2); +} + +.button1:hover { + background: #501b1b; +} + +.GDBFrontend_layout_top { + background: rgb(123, 23, 23); +} + +.GDBFrontend_runtimeControls_btn:hover { + background: #501b1b; +} + +.Checkbox.Checkbox__checked .Checkbox_icon_img { + filter: hue-rotate(320deg) contrast(5); +} + +.GDBFrontend_load_connectBtn_openable { + background: #501b1b; +} + +.GDBFrontend_layout_middle_left { + background: rgb(158, 48, 48); +} + +.GDBFrontend_sources_title { + background: rgb(136, 31, 31); +} + +.GDBFrontend_sources_title_buttons_button_iconImg { +} + +.GDBFrontend_disassembly_title { + background: rgb(136, 31, 31); +} + +.GDBFrontend_disassembly_title_buttons_button_iconImg { +} + +.GDBFrontend_watches_title { + background: rgb(136, 31, 31); +} + +.GDBFrontend_breakpoints_title { + background: rgb(136, 31, 31); +} + +.BreakpointsEditor_items_item_remove { + background: rgba(0, 0, 0, 0.2); +} + +.BreakpointsEditor_items_item_remove:hover { + background: #ff4c4c; +} + +.GDBFrontend_threads_title { + background: rgb(136, 31, 31); +} + +.ThreadsEditor_items_item_num { + color: white; +} + +.ThreadsEditor_items_item:nth-child(odd) { + background: rgba(0,0,0,0.05); +} + +.ThreadsEditor_items_item.ThreadsEditor__current { + background: rgba(255, 255, 255, 0.25); +} + +.GDBFrontend_stack_title { + background: rgb(136, 31, 31); +} + +.StackTrace_items_item_num { + color: white; +} + +.StackTrace_items_item:nth-child(odd) { + background: rgba(0,0,0,0.05); +} + +.StackTrace_items_item.StackTrace__current { + background: rgba(255, 255, 255, 0.25); +} + +.GDBFrontend_variables_title { + background: rgb(136, 31, 31); +} + +.FileTabs_editors_content { + background: rgba(210, 50, 50, 0.3); +} + +.FileTabs_editors_noItem { + background: rgb(111 37 37); + color: white; +} + +.FileTabs_tabs_items_item_closeBtn { + color: white; +} + +.FileTabs_tabs_items_item_closeBtn:hover { + color: white; + opacity: 0.5; +} + +.FileTabs_editors_items_item_variablePopup { + background: #a52323; +} + +.GDBFrontend_terminalCloseBtn, +.GDBFrontend_terminalOpenBtn { + background: rgb(136, 31, 31); +} + +.SourceTree_items_item__dir .SourceTree_items_item_icon { + color: #fff35f; +} + +.Resizable_resizer_draggable { + background: rgb(0, 0, 0, 0.1); +} + +.Watches_items_item_expression_input_rI { + color: white; +} + +.Watches_items_item_value_input_rI { + color: white; +} + +.Disassembly_items_item_addr { + color: #d9edff; +} + +.VariablesExplorer_items_item_button_type { + color: white; +} + +.VariablesExplorer_items_item_button:nth-child(odd) { + background: rgba(0,0,0,0.075); +} + +.FileTabs_tabs_items_item.FileTabs_tabs_items_item__current { + background: rgb(0, 0, 0, 0.25); +} + +.FileTabs_tabs_items_item_pathTooltip_box { + color: white; + background: #661717; +} + +.FileTabs_tabs_items_item_pathTooltip_box_arrow:after { + border-bottom: 10px solid #661717; +} + +.FileBrowser_window_box { + background: #a52323; +} + +.EvaluateExpression_window_box { + background: #a52323; + color: white; +} + +.EvaluateExpression_window_mover { + background-color: #903b3b; +} + +.EvaluateExpression_window_box_header_btn.EvaluateExpression__checked { + color: #fff35f; +} + +.GDBFrontend_layout_top_menuBtn:hover .GDBFrontend_layout_top_menuBtn_label { + background: #501b1b; +} + +.GDBFrontend_layout_top_menuBtn_openable { + background: #501b1b; + color: white; +} + +.GDBFrontend_layout_top_menuBtn_openable_items_item, a.GDBFrontend_layout_top_menuBtn_openable_items_item, a.GDBFrontend_layout_top_menuBtn_openable_items_item:visited { + color: white; +} + +.css_AboutDialog_box { + background: #a52323; +} + +.FuzzyFinder_box { + background: #a52323; +} + +.css_MessageBox_box { + background: #a52323; +} + +.SourceTree_items_item_button:hover { + background: rgb(95, 22, 22, 0.5); +} + +.FileTabs_tabs { + background: rgb(136, 31, 31); +} + +.ace-tomorrow-night-bright { + background: rgb(97, 45, 45); +} + +.ace-tomorrow-night-bright .ace_gutter { + background: rgb(136, 31, 31); +} + +.GDBFrontend_layout_middle_right { + background: rgb(158, 48, 48); +} + +.ace-tomorrow-night-bright .ace_gutter-active-line { + background: rgba(255, 255, 255, 0.3); +} + +.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line { + background: rgba(255, 255, 255, 0.3); +} + +.ace-tomorrow-night-bright .ace_marker-layer .ace_selection { + background: rgba(255, 255, 255, 0.3); +} + +.FileTabs_tabs_items_item { + border-right: 1px solid rgb(255, 255, 255, 0.1); +} + +.Disassembly_items_item.Disassembly__current .Disassembly_items_item_bp { + background: linear-gradient(90deg, rgb(255, 0, 0, 0.5), rgba(255, 255, 255, 0)); +} \ No newline at end of file diff --git a/plugins/theme_red/frontend/html/theme_red.html b/plugins/theme_red/frontend/html/theme_red.html new file mode 100644 index 0000000..e69de29 diff --git a/plugins/theme_red/frontend/js/theme_red.js b/plugins/theme_red/frontend/js/theme_red.js new file mode 100644 index 0000000..2394310 --- /dev/null +++ b/plugins/theme_red/frontend/js/theme_red.js @@ -0,0 +1,14 @@ +/* + * gdb-frontend is a easy, flexible and extensionable gui debugger + * + * https://github.com/rohanrhu/gdb-frontend + * https://oguzhaneroglu.com/projects/gdb-frontend/ + * + * Licensed under GNU/GPLv3 + * Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) + * + */ + +$(document).ready(function () { + GDBFrontend.components.gdbFrontend.components.fileTabs.setAceTheme('ace/theme/tomorrow_night_bright'); +}); \ No newline at end of file diff --git a/plugins/theme_red/theme_red.py b/plugins/theme_red/theme_red.py new file mode 100644 index 0000000..2082e6c --- /dev/null +++ b/plugins/theme_red/theme_red.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# +# gdb-frontend is a easy, flexible and extensionable gui debugger +# +# https://github.com/rohanrhu/gdb-frontend +# https://oguzhaneroglu.com/projects/gdb-frontend/ +# +# Licensed under GNU/GPLv3 +# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) + +# Example GDBFrontend Plugin + +import importlib + +import plugin + +class ThemeRedPlugin(plugin.GDBFrontendPlugin): + def __init__(self): + plugin.GDBFrontendPlugin.__init__(self) + + def loaded(self): + pass + + def unloaded(self): + pass \ No newline at end of file diff --git a/plugins/theme_red/urls.py b/plugins/theme_red/urls.py new file mode 100644 index 0000000..d8707cd --- /dev/null +++ b/plugins/theme_red/urls.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# +# gdb-frontend is a easy, flexible and extensionable gui debugger +# +# https://github.com/rohanrhu/gdb-frontend +# https://oguzhaneroglu.com/projects/gdb-frontend/ +# +# Licensed under GNU/GPLv3 +# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) + +urls = { +} \ No newline at end of file