[gnome-music/wip/jfelder/searchview-new-style: 8/13] twolinetip: Add a subtitle_visible property



commit a4dd1ffc1291aa57544f14b05a0dc8d23b649d71
Author: Jean Felder <jfelder src gnome org>
Date:   Sat Aug 3 20:03:43 2019 +0200

    twolinetip: Add a subtitle_visible property
    
    This allows to hide the subtitle to display only one line.

 gnomemusic/widgets/twolinetip.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/widgets/twolinetip.py b/gnomemusic/widgets/twolinetip.py
index 867105c4..a02dc45d 100644
--- a/gnomemusic/widgets/twolinetip.py
+++ b/gnomemusic/widgets/twolinetip.py
@@ -41,6 +41,7 @@ class TwoLineTip(Gtk.Box):
 
     title = GObject.Property(type=str)
     subtitle = GObject.Property(type=str)
+    subtitle_visible = GObject.Property(type=bool, default=True)
 
     def __repr__(self):
         return '<TwoLineTip>'
@@ -51,3 +52,4 @@ class TwoLineTip(Gtk.Box):
 
         self.bind_property('title', self._title_label, 'label')
         self.bind_property('subtitle', self._subtitle_label, 'label')
+        self.bind_property('subtitle-visible', self._subtitle_label, 'visible')


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