Commit 896d70cf authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno

Ellipsize labels to fit the UI

parent 0d913cfe
Pipeline #54619 passed with stage
in 45 seconds
......@@ -741,6 +741,7 @@
<object class="GtkLabel" id="activity-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">True</property>
......
from typing import Optional
from gi.repository import Gtk, GObject
from gi.repository import Gtk, GObject, Pango
from datetime import datetime
......@@ -39,6 +39,7 @@ class ActivitySummaryWidget(Gtk.Box):
self.name_label = Gtk.Label(label=summary.name)
self.time_label = Gtk.Label(label=time)
self.name_label.set_xalign(0.0)
self.name_label.set_ellipsize(Pango.EllipsizeMode.END)
self.time_label.set_xalign(1.0)
self.pack_start(self.name_label, True, True, 6)
......@@ -98,6 +99,7 @@ class ActivityWidget(Gtk.Box):
self.label = Gtk.Label(label=act.name)
self.label.set_xalign(0.0)
self.label.set_ellipsize(Pango.EllipsizeMode.END)
self.time_label = Gtk.Label(label=self.time())
self.time_label.set_xalign(1.0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment