Mercurial > libervia-desktop-kivy
comparison src/cagou/plugins/plugin_wid_chat.kv @ 97:5d2289127bb7
menu (upload): better menu using dedicated widget:
upload menu now use a decicated widget instead of context menu.
The menu take half the size of the main window, and show each upload option as an icon. Use can select upload or P2P sending, and a short text message explains how the file will be transmitted.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 29 Dec 2016 23:47:07 +0100 |
parents | c711be670ecd |
children | c601e3d40342 |
comparison
equal
deleted
inserted
replaced
96:641678ddc26c | 97:5d2289127bb7 |
---|---|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU Affero General Public License for more details. | 12 # GNU Affero General Public License for more details. |
13 | 13 |
14 # You should have received a copy of the GNU Affero General Public License | 14 # You should have received a copy of the GNU Affero General Public License |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | |
17 #:import TransferMenu cagou.core.menu.TransferMenu | |
16 | 18 |
17 | 19 |
18 <SimpleXHTMLWidgetEscapedText>: | 20 <SimpleXHTMLWidgetEscapedText>: |
19 size_hint: None, None | 21 size_hint: None, None |
20 size: self.texture_size | 22 size: self.texture_size |
98 id: message_input | 100 id: message_input |
99 size_hint: 1, 1 | 101 size_hint: 1, 1 |
100 hint_text: "Enter your message here" | 102 hint_text: "Enter your message here" |
101 on_text_validate: root.onSend(args[0]) | 103 on_text_validate: root.onSend(args[0]) |
102 IconButton | 104 IconButton |
103 # upload button | 105 # transfer button |
104 source: app.expand("{media}/icons/tango/actions/32/list-add.png") | 106 source: app.expand("{media}/icons/tango/actions/32/list-add.png") |
105 allow_stretch: True | 107 allow_stretch: True |
106 size_hint: None, 1 | 108 size_hint: None, 1 |
107 width: max(self.texture_size[0], dp(40)) | 109 width: max(self.texture_size[0], dp(40)) |
108 on_release: upload_menu.show(self) | 110 on_release: TransferMenu(callback=root.onTransferOK).show(self) |
109 UploadMenu: | |
110 id: upload_menu | |
111 callback: root.onUploadOK |