[pitivi] layers: Hide name entry borders when unfocused



commit 09f62579aebbb7c6a208d61dccdf291b12ee14c6
Author: Diego Garcia Gangl <dnicolas gmail com>
Date:   Sun Apr 14 19:56:40 2019 -0300

    layers: Hide name entry borders when unfocused

 pitivi/timeline/layer.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index c94cf008..fe3e816d 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -85,6 +85,14 @@ class LayerControls(Gtk.EventBox, Loggable):
         self.__updateName()
         name_row.pack_start(self.name_entry, True, True, 0)
 
+        entry_provider = Gtk.CssProvider()
+        entry_css = ("entry:not(:focus) { border: 1px solid transparent;"
+                     "background: transparent; }").encode("UTF-8")
+        entry_provider.load_from_data(entry_css)
+        Gtk.StyleContext.add_provider(self.name_entry.get_style_context(),
+                                      entry_provider,
+                                      Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+
         self.menubutton = Gtk.MenuButton.new()
         self.menubutton.props.valign = Gtk.Align.CENTER
         self.menubutton.props.relief = Gtk.ReliefStyle.NONE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]