# HG changeset patch # User Goffi # Date 1470683129 -7200 # Node ID f9869f34f629ab94c3d5bcadfb91eed736a52ff0 # Parent 74117b733bacb4f0725ed103a2852d6f53e91f3d chat: time text is now displayed above text bubble diff -r 74117b733bac -r f9869f34f629 src/cagou/plugins/plugin_wid_chat.kv --- a/src/cagou/plugins/plugin_wid_chat.kv Mon Aug 08 01:07:43 2016 +0200 +++ b/src/cagou/plugins/plugin_wid_chat.kv Mon Aug 08 21:05:29 2016 +0200 @@ -24,21 +24,29 @@ hint_text: "Enter your message here" : - canvas.before: - Color: - rgba: 1, 1, 1, 1 - BorderImage: - source: "cagou/images/border_{}.jpg".format("blue" if root.mess_data.own_mess else "gray") - pos: self.pos - size: self.size mess_label: mess_label size_hint: None,None pos_hint: {'x': 0} if root.mess_data.own_mess else {'right': 1} - height: max(mess_label.height, 20) + height: mess_label.height + time_label.height width: mess_label.width on_height: if root.parent: root.parent.sizeAdjust() + Label: + id: time_label + size_hint: None, None + height: self.texture_size[1] + width: root.parent.width if root.parent else 100 + text: root.mess_data.time_text + halign: "center" BoxLayout: + canvas.before: + Color: + rgba: 1, 1, 1, 1 + BorderImage: + source: "cagou/images/border_{}.jpg".format("blue" if root.mess_data.own_mess else "gray") + pos: self.pos + size: self.size + # Label: # id: nick_label # text: root.mess_data.nick