forked from Mirrors/apostrophe
Merge pull request #148 from goncalossilva/ft.styles
Minor improvements around stylesgithub/fork/yochananmarqos/patch-1 v2.2.0-beta1.4
commit
181af445e6
|
@ -17,19 +17,20 @@
|
|||
bind "<ctl><shift>z" { "redo" () };
|
||||
}
|
||||
|
||||
@define-color math_text_color mix(@theme_fg_color, #00b5ff, 0.15);
|
||||
|
||||
/* Main window and text colors */
|
||||
|
||||
.uberwriter-window {
|
||||
/*border-radius: 7px 7px 3px 3px;*/
|
||||
background: @background_color;
|
||||
caret-color: @foreground_color;
|
||||
background: @theme_base_color;
|
||||
color: @theme_fg_color;
|
||||
caret-color: @theme_fg_color;
|
||||
}
|
||||
|
||||
.uberwriter-window .uberwriter-editor {
|
||||
font-family: 'Fira Mono', monospace;
|
||||
font-size: 16px;
|
||||
padding-top: 80px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.uberwriter-window.small .uberwriter-editor {
|
||||
|
@ -50,27 +51,25 @@
|
|||
}
|
||||
|
||||
#titlebar-container {
|
||||
background: @background_color;
|
||||
background: @theme_base_color;
|
||||
}
|
||||
|
||||
.uberwriter-editor {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
text-decoration-color: #ff0000;
|
||||
/*-GtkWidget-cursor-color: shade(#4D9FCE, 0.9);*/
|
||||
/*-GtkWidget-cursor-aspect-ratio: 0.1;*/
|
||||
text-decoration-color: @error_color;
|
||||
-gtk-key-bindings: editor-bindings;
|
||||
}
|
||||
|
||||
.uberwriter-editor text {
|
||||
background-color: @background_color;
|
||||
color: @foreground_color;
|
||||
caret-color: @foreground_color;
|
||||
background-color: @theme_base_color;
|
||||
color: @theme_fg_color;
|
||||
caret-color: @theme_fg_color;
|
||||
}
|
||||
|
||||
.uberwriter-editor:selected {
|
||||
background-color: #4D9FCE;
|
||||
color: #FFF;
|
||||
.uberwriter-editor text selection {
|
||||
background-color: @theme_selected_bg_color;
|
||||
color: @theme_selected_fg_color;
|
||||
}
|
||||
|
||||
.uberwriter-editor button {
|
||||
|
@ -85,10 +84,9 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
.stats-counter {
|
||||
color: alpha(@foreground_color, 0.6);
|
||||
background-color: @background_color;
|
||||
color: alpha(@theme_fg_color, 0.6);
|
||||
background-color: @theme_base_color;
|
||||
text-shadow: inherit;
|
||||
box-shadow: initial;
|
||||
background-clip: initial;
|
||||
|
@ -108,8 +106,8 @@
|
|||
|
||||
.stats-counter:hover,
|
||||
.stats-counter:checked {
|
||||
color: @foreground_color;
|
||||
background-color: lighter(@background_color);
|
||||
color: @theme_fg_color;
|
||||
background-color: mix(@theme_base_color, @theme_bg_color, 0.5);
|
||||
}
|
||||
|
||||
#PreviewMenuItem image {
|
||||
|
@ -128,9 +126,9 @@
|
|||
/*font: serif 10;*/
|
||||
font-family: serif;
|
||||
font-size: 10px;
|
||||
background: @background_color;
|
||||
background: @theme_bg_color;
|
||||
border-radius: 4px;
|
||||
border-color: @background_color;
|
||||
border-color: @theme_bg_color;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
@ -141,7 +139,7 @@
|
|||
border: 1px solid #333;
|
||||
background: @ligth_bg;
|
||||
border-radius: 3px;
|
||||
border-color: @background_color;
|
||||
border-color: @theme_bg_color;
|
||||
} */
|
||||
|
||||
#LexikonBubble label {
|
||||
|
@ -149,8 +147,8 @@
|
|||
}
|
||||
|
||||
#LexikonBubble {
|
||||
background-color: @background_color;
|
||||
border: 5px solid @background_color;
|
||||
background-color: @theme_bg_color;
|
||||
border: 5px solid @theme_bg_color;
|
||||
}
|
||||
|
||||
#LexikonBubble .lexikon-heading {
|
||||
|
@ -168,15 +166,15 @@
|
|||
}
|
||||
|
||||
.quick-preview-popup {
|
||||
background-color: @background_color;
|
||||
background-color: @theme_bg_color;
|
||||
}
|
||||
|
||||
.quick-preview-popup grid {
|
||||
background-color: @background_color;
|
||||
color: @foreground_color;
|
||||
border-color: @background_color;
|
||||
background-color: @theme_bg_color;
|
||||
color: @theme_fg_color;
|
||||
border-color: @theme_bg_color;
|
||||
}
|
||||
|
||||
.quick-preview-popup label {
|
||||
color: @foreground_color;
|
||||
color: @theme_fg_color;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #2e3436;
|
||||
@define-color background_color #f6f5f4;
|
||||
@define-color math_text_color #00364c;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #eeeeec;
|
||||
@define-color background_color #353535;
|
||||
@define-color math_text_color #ffc9b3;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #3b3e45;
|
||||
@define-color background_color #f5f6f7;
|
||||
@define-color math_text_color #00364c;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #d3dae3;
|
||||
@define-color background_color #383c4a;
|
||||
@define-color math_text_color #ffc9b3;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #3b3e45;
|
||||
@define-color background_color #f5f6f7;
|
||||
@define-color math_text_color #00364C;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #000000;
|
||||
@define-color background_color #ffffff;
|
||||
@define-color math_text_color #000000;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,5 +0,0 @@
|
|||
@define-color foreground_color #ffffff;
|
||||
@define-color background_color #000000;
|
||||
@define-color math_text_color #ffffff;
|
||||
|
||||
@import url("_gtk_base.css");
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("base.css");
|
||||
|
||||
:root {
|
||||
--text-color: #2e3436;
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("web/web__base.css");
|
||||
|
||||
:root {
|
||||
--text-color: #eeeeec;
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("web/web__base.css");
|
||||
|
||||
:root {
|
||||
--text-color: #3b3e45;
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("web/web__base.css");
|
||||
|
||||
:root {
|
||||
--text-color: #d3dae3;
|
|
@ -0,0 +1 @@
|
|||
@import url("web/web_arc.css");
|
|
@ -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,8 +56,9 @@ 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;
|
||||
max-width: 978px;
|
||||
margin: auto;
|
||||
padding: 2em;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("web/web__base.css");
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
|
@ -1,4 +1,4 @@
|
|||
@import url("_web_base.css");
|
||||
@import url("web/web__base.css");
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
|
@ -1 +0,0 @@
|
|||
@import url("web_arc.css");
|
|
@ -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"])
|
||||
|
|
|
@ -84,8 +84,6 @@ class TextView(Gtk.TextView):
|
|||
|
||||
# Focus mode
|
||||
self.focus_mode = False
|
||||
self.original_top_margin = self.props.top_margin
|
||||
self.original_bottom_margin = self.props.bottom_margin
|
||||
self.connect('button-release-event', self.on_button_release_event)
|
||||
|
||||
# Hemingway mode
|
||||
|
@ -127,8 +125,8 @@ class TextView(Gtk.TextView):
|
|||
self.props.top_margin = height / 2
|
||||
self.props.bottom_margin = height / 2
|
||||
else:
|
||||
self.props.top_margin = self.original_top_margin
|
||||
self.props.bottom_margin = self.original_bottom_margin
|
||||
self.props.top_margin = 80
|
||||
self.props.bottom_margin = 64
|
||||
|
||||
def on_button_release_event(self, _widget, _event):
|
||||
if self.focus_mode:
|
||||
|
@ -159,7 +157,7 @@ class TextView(Gtk.TextView):
|
|||
|
||||
If mark is unspecified, the cursor is used."""
|
||||
|
||||
margin = 80
|
||||
margin = 32
|
||||
scrolled_window = self.get_ancestor(Gtk.ScrolledWindow.__gtype__)
|
||||
if not scrolled_window:
|
||||
return
|
||||
|
|
|
@ -14,9 +14,8 @@ class Theme:
|
|||
previous = None
|
||||
settings = Settings.new()
|
||||
|
||||
def __init__(self, name, gtk_css_path, web_css_path, is_dark, inverse_name):
|
||||
def __init__(self, name, web_css_path, is_dark, inverse_name):
|
||||
self.name = name
|
||||
self.gtk_css_path = gtk_css_path
|
||||
self.web_css_path = web_css_path
|
||||
self.is_dark = is_dark
|
||||
self.inverse_name = inverse_name
|
||||
|
@ -49,7 +48,6 @@ class Theme:
|
|||
def __eq__(self, other):
|
||||
return isinstance(other, self.__class__) and \
|
||||
self.name == other.name and \
|
||||
self.gtk_css_path == other.gtk_css_path and \
|
||||
self.web_css_path == other.web_css_path and \
|
||||
self.is_dark == other.is_dark and \
|
||||
self.inverse_name == other.inverse_name
|
||||
|
@ -57,20 +55,13 @@ class Theme:
|
|||
|
||||
defaultThemes = [
|
||||
# https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/Adwaita
|
||||
Theme('Adwaita', get_css_path('gtk_adwaita.css'),
|
||||
get_css_path('web_adwaita.css'), False, 'Adwaita-dark'),
|
||||
Theme('Adwaita-dark', get_css_path('gtk_adwaita_dark.css'),
|
||||
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('gtk_arc.css'),
|
||||
get_css_path('web_arc.css'), False, 'Arc-Dark'),
|
||||
Theme('Arc-Darker', get_css_path('gtk_arc_darker.css'),
|
||||
get_css_path('web_arc_darker.css'), False, 'Arc-Dark'),
|
||||
Theme('Arc-Dark', get_css_path('gtk_arc_dark.css'),
|
||||
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('gtk_high_contrast.css'),
|
||||
get_css_path('web_high_contrast.css'), False, 'HighContrastInverse'),
|
||||
Theme('HighContrastInverse', get_css_path('gtk_high_contrast_inverse.css'),
|
||||
get_css_path('web_high_contrast_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')
|
||||
]
|
||||
|
|
|
@ -176,7 +176,7 @@ class Window(Gtk.ApplicationWindow):
|
|||
|
||||
# Set theme css
|
||||
style_provider = Gtk.CssProvider()
|
||||
style_provider.load_from_path(theme.gtk_css_path)
|
||||
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)
|
||||
|
@ -701,7 +701,7 @@ class Window(Gtk.ApplicationWindow):
|
|||
"""
|
||||
bg_color = self.get_style_context().get_background_color(Gtk.StateFlags.ACTIVE)
|
||||
|
||||
lg_top = cairo.LinearGradient(0, 0, 0, 35) # pylint: disable=no-member
|
||||
lg_top = cairo.LinearGradient(0, 0, 0, 32) # pylint: disable=no-member
|
||||
lg_top.add_color_stop_rgba(
|
||||
0, bg_color.red, bg_color.green, bg_color.blue, 1)
|
||||
lg_top.add_color_stop_rgba(
|
||||
|
@ -710,12 +710,12 @@ class Window(Gtk.ApplicationWindow):
|
|||
width = self.scrolled_window.get_allocation().width
|
||||
height = self.scrolled_window.get_allocation().height
|
||||
|
||||
cr.rectangle(0, 0, width, 35)
|
||||
cr.rectangle(0, 0, width, 32)
|
||||
cr.set_source(lg_top)
|
||||
cr.fill()
|
||||
cr.rectangle(0, height - 35, width, height)
|
||||
cr.rectangle(0, height - 32, width, height)
|
||||
|
||||
lg_btm = cairo.LinearGradient(0, height - 35, 0, height) # pylint: disable=no-member
|
||||
lg_btm = cairo.LinearGradient(0, height - 32, 0, height) # pylint: disable=no-member
|
||||
lg_btm.add_color_stop_rgba(
|
||||
1, bg_color.red, bg_color.green, bg_color.blue, 1)
|
||||
lg_btm.add_color_stop_rgba(
|
||||
|
|
Loading…
Reference in New Issue