Mercurial > libervia-desktop-kivy
diff cagou/kv/menu.kv @ 417:5b50b7ef2617
menu (TransferMenu): UI improvments:
- a white background is now used
- ToggleButton have been replaced by SymbolButtonLabel
- transfer info message now displays with emphasis if the file will be encrypted or not,
and explain when the file goes to the server
- various padding/spacing/color adjustments
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 Feb 2020 17:16:27 +0100 |
parents | 5761b5f03c0c |
children | ee4913d35c55 |
line wrap: on
line diff
--- a/cagou/kv/menu.kv Sun Feb 23 17:13:15 2020 +0100 +++ b/cagou/kv/menu.kv Sun Feb 23 17:16:27 2020 +0100 @@ -42,31 +42,51 @@ <TransferMenu>: items_layout: items_layout orientation: "vertical" + bg_color: app.c_prim size_hint: 1, 0.5 - canvas.before: + padding: [app.MARGIN_LEFT, 3, app.MARGIN_RIGHT, 0] + spacing: dp(5) + transfer_info: transfer_info + upload_btn: upload_btn + on_encrypted: self.updateTransferInfo() + canvas.after: Color: - rgba: 0, 0, 0, 1 - Rectangle: - pos: self.pos - size: self.size + rgba: app.c_prim_dark + Line: + points: 0, self.y + self.height, self.width + self.x, self.y + self.height + width: 1 BoxLayout: size_hint: 1, None height: dp(50) - ToggleButton: + spacing: dp(10) + Widget: + SymbolToggleLabel id: upload_btn + symbol: "upload" text: _(u"upload") group: "transfer" state: "down" - ToggleButton: + on_state: root.updateTransferInfo() + SymbolToggleLabel id: send_btn + symbol: "loop-alt" text: _(u"send") group: "transfer" + Widget: Label: - size_hint: 1, 0.3 - text: root.transfer_txt if upload_btn.state == 'down' else root.send_txt - text_size: self.size + id: transfer_info + size_hint: 1, None + padding: 0, dp(5) + markup: True + text_size: root.width, None + size: self.texture_size halign: 'center' - valign: 'top' + canvas.before: + Color: + rgba: app.c_prim_dark + RoundedRectangle: + pos: self.pos + size: self.size ScrollView: do_scroll_x: False StackLayout: