Mercurial > libervia-desktop-kivy
changeset 236:ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 31 Aug 2018 16:58:15 +0200 |
parents | 525527a01439 |
children | 059c5b39032d |
files | cagou/core/xmlui.py cagou/kv/xmlui.kv |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cagou/core/xmlui.py Fri Aug 31 16:58:10 2018 +0200 +++ b/cagou/core/xmlui.py Fri Aug 31 16:58:15 2018 +0200 @@ -84,7 +84,7 @@ class StringWidget(xmlui.StringWidget, TextInput, TextInputOnChange): def __init__(self, xmlui_parent, value, read_only=False): - TextInput.__init__(self, text=value, multiline=False) + TextInput.__init__(self, text=value) TextInputOnChange.__init__(self) self.readonly = read_only @@ -95,6 +95,10 @@ return self.text +class TextBoxWidget(xmlui.TextBoxWidget, StringWidget): + pass + + class JidInputWidget(xmlui.JidInputWidget, StringWidget): pass
--- a/cagou/kv/xmlui.kv Fri Aug 31 16:58:10 2018 +0200 +++ b/cagou/kv/xmlui.kv Fri Aug 31 16:58:15 2018 +0200 @@ -28,8 +28,13 @@ <StringWidget,PasswordWidget,IntWidget>: + multiline: False + background_normal: app.expand('atlas://data/images/defaulttheme/textinput') - background_normal: app.expand('atlas://data/images/defaulttheme/textinput') + +<TextBoxWidget>: + multiline: True + height: dp(common_height) * 5 <ButtonWidget>: @@ -129,6 +134,7 @@ <XMLUIPanel>: + height: self.minimum_height canvas.before: Color: rgba: 0, 0, 0, 1