~comcloudway/choochoo

bdf3ae6ce6b3576496bd19826c0eb0606f1f0a33 — Jakob Meier 5 months ago e91d5d9
set qr code size, so it force scrolls the page instead of collapsing
1 files changed, 12 insertions(+), 1 deletions(-)

M choochoo/ticketview.py
M choochoo/ticketview.py => choochoo/ticketview.py +12 -1
@@ 61,10 61,15 @@ class TicketScreen(Adw.NavigationPage):
        pic.set_margin_bottom(12)
        pic.set_margin_start(12)
        pic.set_margin_end(12)
        pic.set_size_request(300,300)
        self.qrbox.set_child(pic)

    def update(self):
        page = Gtk.Box.new(Gtk.Orientation.VERTICAL,12)
        page.set_margin_top(12)
        page.set_margin_bottom(12)
        page.set_margin_start(12)
        page.set_margin_end(12)
        code_group = Adw.PreferencesGroup()
        code_group.set_title(_("D-Ticket"))
        code_group.set_description(_("Show this at the ticket inspection"))


@@ 85,13 90,19 @@ class TicketScreen(Adw.NavigationPage):
        connection_group = Adw.PreferencesGroup()
        connection_group.set_title(_("Ticket details"))
        connection_group.set_description(_("Validity and payment information"))
        # show issued on, valid from/until rows
        # show issued on, valid from/until rows, ticket number
        issued_row = DateRow(_("Issued on"), self.ticket.issued_at)
        connection_group.add(issued_row)
        from_row = DateRow(_("Valid from"), self.ticket.valid_from)
        connection_group.add(from_row)
        until_row = DateRow(_("Valid until"), self.ticket.valid_until)
        connection_group.add(until_row)
        id_row = Adw.ActionRow()
        id_row.set_title(_("Ticket number"))
        id_label = Gtk.Label()
        id_label.set_label(self.ticket.ticket_number)
        id_row.add_suffix(id_label)
        connection_group.add(id_row)
        page.append(connection_group)
        personal_group = Adw.PreferencesGroup()
        personal_group.set_title(_("Personal details"))