cleaned up themes; added peacocks in space theme

This commit is contained in:
itdominator 2023-10-23 00:04:07 -05:00
parent 92e43b359b
commit 2f44a0e033
10 changed files with 130 additions and 299 deletions

View File

@ -132,4 +132,5 @@ class EditorEventsMixin:
source_view.set_buffer_language(language)
def set_buffer_style(self, source_view, style = settings.theming.syntax_theme):
source_view.set_buffer_style(style)
buffer = source_view.get_buffer()
source_view.set_buffer_style(buffer, style)

View File

@ -33,7 +33,11 @@ class ThemePopover(Gtk.Popover):
event_system.subscribe("show_theme_popup", self._show_theme_popup)
def _load_widgets(self):
manager = GtkSource.StyleSchemeManager()
style_scheme = manager.get_scheme(settings.theming.syntax_theme)
self._style_choser = GtkSource.StyleSchemeChooserWidget()
self._style_choser.set_style_scheme(style_scheme)
self._style_choser.show_all()
self._style_choser.connect("button-release-event", self._set_theme)
@ -82,4 +86,4 @@ class ThemeButton(Gtk.Button):
def _show_popover(self, widget, eve = None):
event_system.emit("show_theme_popup")
event_system.emit("show_theme_popup")

View File

@ -24,7 +24,10 @@ class TransparencyScale(Gtk.Scale):
def _setup_styling(self):
self.set_digits(0)
self.set_hexpand(True)
self.set_size_request(240, -1)
self.set_value_pos(Gtk.PositionType.RIGHT)
self.add_mark(0.0, Gtk.PositionType.TOP, "Transparency:")
self.add_mark(50.0, Gtk.PositionType.TOP, "50%")

View File

@ -33,7 +33,7 @@ class SaveFileDialog:
def _load_widgets(self):
self._file_filter_text = Gtk.FileFilter()
self._file_filter_text.set_name("Text Files")
self._file_filter_text.set_name("Code Files")
for p in settings.filters.code:
self._file_filter_text.add_pattern(p)
@ -53,7 +53,9 @@ class SaveFileDialog:
dlg.add_filter(self._file_filter_all)
if current_filename == "":
import os
dlg.set_current_name("new.txt")
filechooser.set_current_folder(os.path.expanduser('~'))
else:
dlg.set_current_folder(current_file.get_parent().get_path())
dlg.set_current_name(current_filename)

View File

@ -8,7 +8,7 @@ from dataclasses import dataclass
@dataclass
class Theming:
transparency: int = 64
transparency: int = 62
default_zoom: int = 12
syntax_theme: str = "tango"
success_color: str = "#88cc27"

View File

@ -1,113 +0,0 @@
<style-scheme name="Black Leaf" id="blackleaf" version="1.0">
<author>Hamad Al Marri</author>
<description>Color scheme using Black Leaf color palette</description>
<!-- Color Palette -->
<color name="background" value="#172601"/>
<color name="foreground" value="#EDF2C2"/>
<color name="cursor" value="#00DEA4"/>
<!-- Normal Colors-->
<color name="n_black" value="#172601"/>
<color name="n_red" value="#FF636E"/>
<color name="n_green" value="#B1F02A"/>
<color name="n_yellow" value="#ECF22E"/>
<color name="n_blue" value="#46EBE3"/>
<color name="n_magenta" value="#FFC800"/>
<color name="n_cyan" value="#42E1E5"/>
<color name="n_white" value="#7C7C7C"/>
<!-- Bright Colors-->
<!-- <color name="b_black" value="#5E5C64"/>-->
<!-- <color name="b_red" value="#FF636E"/>-->
<color name="b_green" value="#33DA7A"/>
<color name="b_yellow" value="#30F077"/>
<color name="b_blue" value="#608FC8"/>
<color name="b_magenta" value="#FDA954"/>
<color name="b_cyan" value="#C0BBC5"/>
<color name="b_white" value="#FFFFFF"/>
<!-- Extra Colors -->
<color name="extra1" value="#274611"/>
<color name="extra2" value="#000000"/>
<color name="extra3" value="#A09BA5"/>
<color name="extra4" value="#839004"/>
<!-- Global Settings -->
<style name="text" foreground="foreground" background="background" />
<style name="line-numbers" foreground="extra3" background="background" />
<style name="current-line" background="extra1" />
<style name="draw-spaces" foreground="b_white"/>
<style name="background-pattern" background="extra2" />
<style name="selection" foreground="extra2" background="n_green" />
<style name="cursor" foreground="cursor" />
<style name="secondary-cursor" foreground="cursor" />
<style name="right-margin" foreground="extra2" background="n_green" />
<!-- Bracket Matching -->
<style name="bracket-match" foreground="n_magenta" bold="true" />
<style name="bracket-mismatch" foreground="n_red" background="background" bold="true" />
<!-- Search Matching -->
<style name="search-match" foreground="extra2" background="n_green" bold="true" />
<!-- Comments -->
<style name="def:comment" foreground="extra4" />
<style name="def:shebang" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<!-- Constants -->
<style name="def:constant" foreground="n_green" />
<style name="def:special-char" foreground="b_green" />
<!-- Language Syntax -->
<style name="def:identifier" foreground="b_yellow" />
<style name="def:statement" foreground="n_blue" />
<style name="def:type" foreground="b_green" />
<style name="def:operator" foreground="b_magenta" />
<style name="def:arith-operator" foreground="n_yellow" />
<style name="def:preprocessor" foreground="n_magenta" />
<style name="def:error" foreground="n_red" bold="true" />
<style name="def:warning" background="b_yellow"/>
<!-- Others -->
<style name="def:note" foreground="n_white" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<!-- Markup -->
<style name="def:emphasis" italic="true"/>
<style name="def:strong-emphasis" foreground="n_cyan" bold="true"/>
<style name="def:inline-code" foreground="n_green"/>
<style name="def:insertion" underline="single"/>
<style name="def:deletion" strikethrough="true"/>
<style name="def:link-text" foreground="n_blue"/>
<style name="def:link-symbol" foreground="n_blue" bold="true"/>
<style name="def:link-destination" italic="true" underline="single"/>
<style name="def:heading" foreground="n_magenta" bold="true"/>
<style name="def:thematic-break" foreground="b_magenta" bold="true"/>
<style name="def:preformatted-section" foreground="b_yellow"/>
<style name="def:list-marker" foreground="b_cyan" bold="true"/>
<!-- Language specific -->
<style name="diff:added-line" foreground="n_green"/>
<style name="diff:removed-line" foreground="n_red"/>
<style name="diff:changed-line" use-style="def:preprocessor"/>
<style name="diff:diff-file" use-style="def:type"/>
<style name="diff:location" use-style="def:statement"/>
<style name="diff:special-case" use-style="def:constant"/>
<style name="xml:tags" foreground="n_green"/>
<style name="xml:namespace" bold="true"/>
<style name="js:built-in-constructor" foreground="n_green"/>
<style name="latex:display-math" foreground="b_blue"/>
<style name="latex:command" foreground="n_magenta" bold="true"/>
<style name="latex:include" use-style="def:preprocessor"/>
<style name="latex:special-char" use-style="def:constant"/>
<style name="sh:variable" foreground="n_blue"/>
<style name="sh:variable-definition" foreground="n_magenta"/>
</style-scheme>

View File

@ -1,114 +0,0 @@
<style-scheme name="Chocolate Ice Cream" id="chocolateicecream" version="1.0">
<author>Hamad Al Marri</author>
<description>Color scheme using Chocolate Ice Cream color palette</description>
<!-- Color Palette -->
<color name="background" value="#36292d"/>
<color name="foreground" value="#ffffda"/>
<color name="cursor" value="#ffc400"/>
<!-- Normal Colors-->
<color name="n_black" value="#172601"/>
<color name="n_red" value="#ff1846"/>
<color name="n_green" value="#0DD100"/>
<color name="n_yellow" value="#fef5d7"/>
<color name="n_blue" value="#00b5ff"/>
<color name="n_magenta" value="#ff749b"/>
<color name="n_cyan" value="#60dede"/>
<color name="n_white" value="#7C7C7C"/>
<!-- Bright Colors-->
<!-- <color name="b_black" value="#5E5C64"/>-->
<!-- <color name="b_red" value="#FF636E"/>-->
<color name="b_green" value="#c2ff8e"/>
<color name="b_yellow" value="#eee5c7"/>
<color name="b_blue" value="#cac5ff"/>
<color name="b_magenta" value="#D33682"/>
<color name="b_cyan" value="#00b5ff"/>
<color name="b_white" value="#FFFFFF"/>
<!-- Extra Colors -->
<color name="extra1" value="#4d3436"/>
<color name="extra2" value="#BEB0BE"/>
<color name="extra3" value="#847479"/>
<color name="extra4" value="#839004"/>
<color name="extra5" value="#827082"/>
<!-- Global Settings -->
<style name="text" foreground="foreground" background="background" />
<style name="line-numbers" foreground="extra3" background="background" />
<style name="current-line" background="extra1" />
<style name="draw-spaces" foreground="b_white"/>
<style name="background-pattern" background="extra2" />
<style name="selection" foreground="background" background="b_yellow" />
<style name="cursor" foreground="cursor" />
<style name="secondary-cursor" foreground="cursor" />
<style name="right-margin" foreground="extra2" background="extra5" />
<!-- Bracket Matching -->
<style name="bracket-match" foreground="b_green" bold="true" />
<style name="bracket-mismatch" foreground="b_green" background="n_red" bold="true" />
<!-- Search Matching -->
<style name="search-match" foreground="background" background="b_yellow" bold="true" />
<!-- Comments -->
<style name="def:comment" foreground="extra3" />
<style name="def:shebang" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<!-- Constants -->
<style name="def:constant" foreground="n_cyan" />
<style name="def:special-char" foreground="n_blue" />
<!-- Language Syntax -->
<style name="def:identifier" foreground="b_blue" />
<style name="def:statement" foreground="n_magenta" />
<style name="def:type" foreground="b_blue" />
<style name="def:operator" foreground="n_blue" />
<style name="def:arith-operator" foreground="n_green" />
<style name="def:preprocessor" foreground="n_blue" />
<style name="def:error" foreground="n_red" bold="true" />
<style name="def:warning" background="b_yellow"/>
<!-- Others -->
<style name="def:note" foreground="n_white" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<!-- Markup -->
<style name="def:emphasis" italic="true"/>
<style name="def:strong-emphasis" foreground="n_cyan" bold="true"/>
<style name="def:inline-code" foreground="n_blue"/>
<style name="def:insertion" underline="single"/>
<style name="def:deletion" strikethrough="true"/>
<style name="def:link-text" foreground="n_blue"/>
<style name="def:link-symbol" foreground="n_blue" bold="true"/>
<style name="def:link-destination" italic="true" underline="single"/>
<style name="def:heading" foreground="n_magenta" bold="true"/>
<style name="def:thematic-break" foreground="b_magenta" bold="true"/>
<style name="def:preformatted-section" foreground="b_blue"/>
<style name="def:list-marker" foreground="n_green" bold="true"/>
<!-- Language specific -->
<style name="diff:added-line" foreground="n_green"/>
<style name="diff:removed-line" foreground="n_magenta"/>
<style name="diff:changed-line" use-style="def:preprocessor"/>
<style name="diff:diff-file" use-style="def:type"/>
<style name="diff:location" use-style="def:operator"/>
<style name="diff:special-case" use-style="def:constant"/>
<style name="xml:tags" foreground="n_magenta"/>
<style name="xml:namespace" bold="true"/>
<style name="js:built-in-constructor" foreground="n_magenta"/>
<style name="latex:display-math" foreground="b_blue"/>
<style name="latex:command" foreground="n_magenta" bold="true"/>
<style name="latex:include" use-style="def:preprocessor"/>
<style name="latex:special-char" use-style="def:constant"/>
<style name="sh:variable" foreground="n_blue"/>
<style name="sh:variable-definition" foreground="n_magenta"/>
</style-scheme>

View File

@ -1,67 +0,0 @@
<style-scheme name="Dark Chocolate Ice Cream" id="darkchocolateicecream" version="1.0">
<author>Hamad Al Marri</author>
<description>Color scheme using Dark Chocolate Ice Cream color palette</description>
<style name="text" foreground="#A87D7D" background="#1b1414" />
<style name="selection" foreground="#A87D7D" background="#443232" />
<style name="cursor" foreground="#ffc400" />
<style name="secondary-cursor" foreground="#f1f0f1" />
<style name="current-line" background="#443232" />
<style name="line-numbers" foreground="#A87D7D" background="#1b1414" />
<style name="background-pattern" background="#201818" />
<style name="bracket-match" bold="true" italic="true" />
<style name="bracket-mismatch" bold="true" italic="true" background="#ff1846" />
<style name="right-margin" foreground="#BEB0BE" background="#827082" />
<style name="search-match" foreground="#A87D7D" background="#FCE94F" bold="true" />
<style name="def:comment" foreground="#847479" />
<style name="def:shebang" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<style name="def:constant" foreground="#999999" />
<style name="def:special-char" foreground="#00b5ff" />
<style name="def:statement" foreground="#A87D7D" bold="true" />
<style name="def:operator" foreground="#af8686" />
<style name="def:arith-operator" foreground="#af8686" />
<style name="def:preprocessor" foreground="#485C69" />
<style name="def:error" foreground="#ff1846" bold="true" />
<style name="def:note" foreground="#D33682" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<style name="def:identifier" foreground="#af8686" />
<style name="def:type" foreground="#af8686" underline="true" />
<!-- Markup -->
<style name="def:emphasis" italic="true"/>
<style name="def:strong-emphasis" foreground="#D33682" bold="true"/>
<style name="def:inline-code" foreground="#999999"/>
<style name="def:insertion" underline="single"/>
<style name="def:deletion" strikethrough="true"/>
<style name="def:link-text" foreground="#999999"/>
<style name="def:link-symbol" foreground="#777" bold="true"/>
<style name="def:link-destination" italic="true" underline="single"/>
<style name="def:heading" foreground="#999999" bold="true"/>
<style name="def:thematic-break" foreground="#999999" bold="true"/>
<style name="def:preformatted-section" foreground="#999999"/>
<style name="def:list-marker" foreground="#FCE94F" bold="true"/>
<!-- Language specific -->
<style name="diff:added-line" foreground="#0DD100"/>
<style name="diff:removed-line" foreground="#ff749b"/>
<style name="diff:changed-line" use-style="def:preprocessor"/>
<style name="diff:diff-file" use-style="def:type"/>
<style name="diff:location" use-style="def:constant"/>
<style name="diff:special-case" use-style="def:constant"/>
<style name="xml:tags" foreground="#ff749b"/>
<style name="xml:namespace" bold="true"/>
<style name="js:built-in-constructor" foreground="#ff749b"/>
<style name="latex:display-math" foreground="#00b5ff"/>
<style name="latex:command" foreground="#ff749b" bold="true"/>
<style name="latex:include" use-style="def:preprocessor"/>
<style name="latex:special-char" use-style="def:constant"/>
<style name="sh:variable" foreground="#00b5ff"/>
<style name="sh:variable-definition" foreground="#ff749b"/>
</style-scheme>

View File

@ -0,0 +1,115 @@
<style-scheme name="Peacocks In Space" id="peacocks-in-space" version="1.0">
<author> ITDominator</author>
<description>A port of Dayle Rees' Peacocks In Space theme with some modifications.</description>
<style name="current-line" background="#2b303b" />
<style name="current-line-number" background="#f7b83d" />
<style name="draw-spaces" foreground="#babdb6" />
<style name="background-pattern" background="#6e7a94" />
<style name="bracket-match" foreground="#white" background="#gray" />
<style name="bracket-mismatch" foreground="#white" background="#FF5D38" />
<style name="right-margin" foreground="#dee3ec" background="#454a54" />
<style name="search-match" background="#E6DB74" />
<style name="def:comment" foreground="#8998b9" />
<style name="def:shebang" foreground="#00a8c6" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<style name="def:constant" foreground="#E6DB74" />
<style name="def:special-char" foreground="#26A6A6" />
<style name="def:identifier" foreground="#FF5D38" />
<style name="def:statement" foreground="#26A6A6" bold="true" />
<style name="def:type" foreground="#E6DB74" bold="true" />
<style name="def:preprocessor" foreground="#8998b9" />
<style name="def:error" background="#FF5D38" bold="true" />
<style name="def:warning" background="#f7b83d" />
<style name="def:note" foreground="#00a8c6" background="#yellow" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<style name="diff:added-line" foreground="#008B8B" />
<style name="diff:removed-line" foreground="#6A5ACD" />
<style name="diff:changed-line" foreground="#8998b9" />
<style name="diff:special-case" foreground="#E6DB74" />
<style name="diff:location" foreground="#26A6A6" bold="true" />
<style name="diff:diff-file" foreground="#E6DB74" bold="true" />
<style name="xml:tags" foreground="#00a8c6" />
<style name="xml:attribute-name" foreground="#ff5d38" />
<style name="xml:namespace" foreground="#E6DB74" bold="true" />
<style name="js:object" foreground="#2E8B57" bold="true" />
<style name="js:constructors" foreground="#008B8B" />
<style name="latex:display-math" foreground="#6A5ACD" />
<style name="latex:command" foreground="#2E8B57" bold="true" />
<style name="latex:include" foreground="#8998b9" />
<style name="sh:variable" foreground="#6A5ACD" />
<style name="Others" foreground="#2E8B57" bold="true" />
<style name="Others 2" foreground="#008B8B" />
<style name="Others 3" foreground="#6A5ACD" />
<style name="python:builtin-object" foreground="#00a8c6" />
<style name="python:class-name" foreground="#ff5d38" />
<style name="python:function-name" foreground="#e6db74" />
<style name="python:keyword" foreground="#00a8c6" />
<style name="python:special-variable" foreground="#26a269" />
<style name="python:boolean" foreground="#ff5d38" />
<style name="python:complex" foreground="#ff5d38" />
<style name="python:format" foreground="#bf3f3f" />
<style name="python:builtin-constant" foreground="#ff5d38" />
<style name="python:builtin-function" foreground="#e6db74" />
<style name="python:module-handler" foreground="#00a8c6" />
<style name="python:escaped-char" foreground="#ff5d38" />
<style name="reserved" foreground="#ff5d38" />
<style name="operator" foreground="#00a8c6" />
<style name="keyword" foreground="#00a8c6" />
<style name="line-numbers" foreground="#ffffff" />
<style name="python3:function-name" foreground="#e6db74" />
<style name="text" />
<style name="emphasis" />
<style name="function" foreground="#e6db74" />
<style name="selection-unfocused" background="#ff7800" />
<style name="html:attrib-name" foreground="#ff5d38" />
<style name="html:dtd" />
<style name="html:attrib-value" foreground="#e6db74" />
<style name="xml:element-name" foreground="#00a8c6" />
<style name="xml:attribute-value" foreground="#e6db74" />
<style name="html:comment" foreground="#8998b9" />
<style name="xml:comment" foreground="#8998b9" />
<style name="python3:builtin-function" foreground="#ff5d38" />
<style name="python3:builtin-object" foreground="#ff5d38" />
<style name="python3:class-name" foreground="#ff5d38" />
<style name="python3:builtin-constant" foreground="#ff5d38" />
<style name="python3:complex" foreground="#e6db74" />
<style name="python3:escaped-char" foreground="#ff5d38" />
<style name="python3:decimal" />
<style name="python3:format" />
<style name="python3:base-n-integer" />
<style name="php:comment" foreground="#8998b9" />
<style name="php:string" foreground="#e6db74" />
<style name="json:keyname" foreground="#ff5d38" />
<style name="json:string" foreground="#e6db74" />
<style name="json:null-value" foreground="#e01b24" />
<style name="json:float" foreground="#00a8c6" />
<style name="json:boolean" foreground="#33d17a" />
<style name="java:reserved" foreground="#ff5d38" />
<style name="js:function-expression" />
<style name="js:identifier" />
<style name="js:object-literal" />
<style name="js:expression-statement" foreground="#e6db74" />
<style name="js:expression" />
<style name="js:label-statement" />
<style name="js:variable-declaration" />
<style name="js:rest-syntax" />
<style name="js:regex-group" />
<style name="js:keyword" foreground="#00a8c6" />
<style name="js:grouping-operator" foreground="#ed333b" />
<style name="js:grouping" foreground="#2ec27e" />
<style name="js:escape" foreground="#ff5d38" />
<style name="js:directive" />
<style name="js:class-expression" />
<style name="js:built-in-property" />
<style name="js:built-in-object" />
<style name="js:built-in-method" />
<style name="js:built-in-function" />
<style name="js:built-in-constructor" />
<style name="js:block-statement" />
<style name="js:ternary-operator" foreground="#00a8c6" />
<style name="js:throw-statement" foreground="#00a8c6" />
<style name="js:try-catch-statement" foreground="#00a8c6" />
<style name="js:spread-syntax" />
<style name="js:switch-statement" foreground="#00a8c6" />
</style-scheme>

View File

@ -110,7 +110,7 @@
]
},
"theming":{
"transparency":64,
"transparency":62,
"default_zoom":12,
"syntax_theme":"solarized-dark",
"success_color":"#88cc27",