From 8d7b2ed22a3a72a4d30f6364ec7505ab71b7e8ea Mon Sep 17 00:00:00 2001 From: attus Date: Fri, 26 Oct 2018 22:35:51 +0200 Subject: [PATCH] caribou: python css fix --- caribou/maintainer | 2 +- caribou/patches/antler.diff | 59 +++++++++++++++++++++++++++++ caribou/patches/style.css-fix.patch | 28 ++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 caribou/patches/antler.diff create mode 100644 caribou/patches/style.css-fix.patch diff --git a/caribou/maintainer b/caribou/maintainer index 7a534c899..210c37c94 100644 --- a/caribou/maintainer +++ b/caribou/maintainer @@ -1 +1 @@ -Páder Rezső +Kiss Attila diff --git a/caribou/patches/antler.diff b/caribou/patches/antler.diff new file mode 100644 index 000000000..223ee427d --- /dev/null +++ b/caribou/patches/antler.diff @@ -0,0 +1,59 @@ +diff --git a/caribou/antler/main.py b/caribou/antler/main.py +index 3a558d2e76a19bb265c58209518c7e8fb98bf93c..9d3df8787fa31f81d46548f509385b27d9f5ee90 100644 +--- a/caribou/antler/main.py ++++ b/caribou/antler/main.py +@@ -1,7 +1,8 @@ + import gi + gi.require_version('Caribou', '1.0') + gi.require_version('Gtk', '3.0') +-from gi.repository import Caribou, GLib, GObject, Gtk ++gi.require_version('GtkClutter', '1.0') ++from gi.repository import Caribou, GLib, GObject, Gtk, GtkClutter + from .window import AntlerWindowEntry + from .keyboard_view import AntlerKeyboardView + import sys +@@ -14,6 +15,7 @@ class AntlerKeyboardService(Caribou.KeyboardService, AntlerKeyboardCommand): + def __init__(self, args=None): + GObject.GObject.__init__(self) + self.register_keyboard("Antler") ++ GtkClutter.init(None) + self.window = AntlerWindowEntry(AntlerKeyboardView) + + def run(self): +diff --git a/caribou/antler/window.py b/caribou/antler/window.py +index 09d770a4ad6a76de5866a9f38bb35904c3c9aa6e..553c6e0b4addb2bb2e31fb536db3f8ff8d520de1 100644 +--- a/caribou/antler/window.py ++++ b/caribou/antler/window.py +@@ -22,17 +22,19 @@ + + import gi + gi.require_version('Clutter', '1.0') ++gi.require_version('GtkClutter', '1.0') + from gi.repository import Gtk + from gi.repository import Gdk + from gi.repository import GObject + from gi.repository import Clutter ++from gi.repository import GtkClutter + from .antler_settings import AntlerSettings + from math import sqrt + import os + import sys + + +-class AnimatedWindowBase(Gtk.Window, Clutter.Animatable): ++class AnimatedWindowBase(GtkClutter.Window, Clutter.Animatable): + __gproperties__ = { + 'antler-window-x' : (GObject.TYPE_INT, 'Window position', + 'Window X coordinate', +@@ -45,10 +47,9 @@ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable): + } + def __init__(self): + GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP) +- Clutter.init(None) + + # animation +- self._stage = Clutter.Stage.get_default() ++ self._stage = None #not used + self._move_animation = None + self._opacity_animation = None + diff --git a/caribou/patches/style.css-fix.patch b/caribou/patches/style.css-fix.patch new file mode 100644 index 000000000..cb32a178d --- /dev/null +++ b/caribou/patches/style.css-fix.patch @@ -0,0 +1,28 @@ +From a6edc4cec5819b6e01a370c24c0628040afd0b9b Mon Sep 17 00:00:00 2001 +From: Jeremy Bicha +Date: Fri, 1 Dec 2017 12:11:35 -0500 +Subject: [PATCH] style.css: Fix failure to start in GNOME Flashback + +The order for 'font' properties matters +https://developer.gnome.org/gtk3/stable/chap-css-properties.html + +https://bugzilla.gnome.org/show_bug.cgi?id=791001 +--- + data/antler/style.css | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/antler/style.css b/data/antler/style.css +index 5ab6f71..4d84904 100644 +--- a/data/antler/style.css ++++ b/data/antler/style.css +@@ -13,7 +13,7 @@ + border-width: 0px; + border-radius: 2px; + border-image: url("dark-key-border.svg") 2 2 2 2 repeat stretch; +- font: Sans 14px; ++ font: 14px Sans; + background-image: -gtk-gradient (linear, + left top, + left bottom, +-- +2.14.1 \ No newline at end of file