Split gtk and web CSS into separate directories

Helps clean up the CSS selection on the export dialog, as only Web CSS
is useful in that scenario.
github/fork/yochananmarqos/patch-1
Gonçalo Silva 2019-04-19 12:08:11 +01:00
parent e87de1424e
commit 81f9104d9f
13 changed files with 18 additions and 19 deletions

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("base.css");
:root {
--text-color: #2e3436;

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("web/web__base.css");
:root {
--text-color: #eeeeec;

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("web/web__base.css");
:root {
--text-color: #3b3e45;

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("web/web__base.css");
:root {
--text-color: #d3dae3;

View File

@ -0,0 +1 @@
@import url("web/web_arc.css");

View File

@ -1,11 +1,11 @@
@font-face {
font-family: fira-sans;
src: url("../fonts/fira-sans-v9-vietnamese_latin_cyrillic-ext_cyrillic_greek-ext_latin-ext_greek-regular.woff2") format("woff2");
src: url("../../fonts/fira-sans-v9-vietnamese_latin_cyrillic-ext_cyrillic_greek-ext_latin-ext_greek-regular.woff2") format("woff2");
}
@font-face {
font-family: fira-mono;
src: url("../fonts/fira-mono-v7-latin_cyrillic-ext_cyrillic_greek-ext_latin-ext_greek-regular.woff2") format("woff2");
src: url("../../fonts/fira-mono-v7-latin_cyrillic-ext_cyrillic_greek-ext_latin-ext_greek-regular.woff2") format("woff2");
}
@font-face {
@ -56,7 +56,6 @@ body {
background-color: var(--background-color);
font-family: "Fira Sans", fira-sans, sans-serif, color-emoji;
line-height: 1.5;
text-size-adjust: 100%;
word-wrap: break-word;
padding: 2em;
}

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("web/web__base.css");
a {
text-decoration: underline;

View File

@ -1,4 +1,4 @@
@import url("web__base.css");
@import url("web/web__base.css");
a {
text-decoration: underline;

View File

@ -1 +0,0 @@
@import url("web_arc.css");

View File

@ -126,7 +126,7 @@ class Application(Gtk.Application):
# Shortcuts
# TODO: be aware that a couple of shortcuts are defined in gtk_base.css
# TODO: be aware that a couple of shortcuts are defined in base.css
self.set_accels_for_action("app.focus_mode", ["<Ctl>d"])
self.set_accels_for_action("app.hemingway_mode", ["<Ctl>t"])

View File

@ -55,13 +55,13 @@ class Theme:
defaultThemes = [
# https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/Adwaita
Theme('Adwaita', get_css_path('web_adwaita.css'), False, 'Adwaita-dark'),
Theme('Adwaita-dark', get_css_path('web_adwaita_dark.css'), True, 'Adwaita'),
Theme('Adwaita', get_css_path('web/adwaita.css'), False, 'Adwaita-dark'),
Theme('Adwaita-dark', get_css_path('web/adwaita_dark.css'), True, 'Adwaita'),
# https://github.com/NicoHood/arc-theme/tree/master/common/gtk-3.0/3.20/sass
Theme('Arc', get_css_path('web_arc.css'), False, 'Arc-Dark'),
Theme('Arc-Darker', get_css_path('web_arc_darker.css'), False, 'Arc-Dark'),
Theme('Arc-Dark', get_css_path('web_arc_dark.css'), True, 'Arc'),
Theme('Arc', get_css_path('web/arc.css'), False, 'Arc-Dark'),
Theme('Arc-Darker', get_css_path('web/arc_darker.css'), False, 'Arc-Dark'),
Theme('Arc-Dark', get_css_path('web/arc_dark.css'), True, 'Arc'),
# https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/HighContrast
Theme('HighContrast', get_css_path('web_highcontrast.css'), False, 'HighContrastInverse'),
Theme('HighContrastInverse', get_css_path('web_highcontrast_inverse.css'), True, 'HighContrast')
Theme('HighContrast', get_css_path('web/highcontrast.css'), False, 'HighContrastInverse'),
Theme('HighContrastInverse', get_css_path('web/highcontrast_inverse.css'), True, 'HighContrast')
]

View File

@ -176,7 +176,7 @@ class Window(Gtk.ApplicationWindow):
# Set theme css
style_provider = Gtk.CssProvider()
style_provider.load_from_path(helpers.get_css_path("gtk_base.css"))
style_provider.load_from_path(helpers.get_css_path("gtk/base.css"))
Gtk.StyleContext.add_provider_for_screen(
self.get_screen(), style_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)