Skip to content

Commit

Permalink
Merge pull request Bitmessage#63 from jaicis/Chatroom
Browse files Browse the repository at this point in the history
worked on chatroom Ui designing
  • Loading branch information
navjotcis committed Apr 30, 2020
2 parents c70d9c8 + 2813912 commit a03d2cc
Show file tree
Hide file tree
Showing 5 changed files with 268 additions and 11 deletions.
58 changes: 58 additions & 0 deletions src/bitmessagekivy/kv/chat_list.kv
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<ChatList>:
name: 'chlist'
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.pos
size: self.size
MDTabs:
id: chat_panel
tab_display_mode:'text'

Tab:
text: "Chats"
BoxLayout:
id: chat_box
orientation: 'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
MDLabel:
font_style: 'Caption'
theme_text_color: 'Primary'
text: 'No Chat'
halign: 'center'
size_hint_y: None
bold: True
valign: 'top'
# OneLineAvatarListItem:
# text: "Single-line item with avatar"
# divider: None
# _no_ripple_effect: True
# ImageLeftWidget:
# source: './images/text_images/A.png'
# OneLineAvatarListItem:
# text: "Single-line item with avatar"
# divider: None
# _no_ripple_effect: True
# ImageLeftWidget:
# source: './images/text_images/B.png'
# OneLineAvatarListItem:
# text: "Single-line item with avatar"
# divider: None
# _no_ripple_effect: True
# ImageLeftWidget:
# source: './images/text_images/A.png'
Tab:
text: "Contacts"
BoxLayout:
id: contact_box
orientation: 'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
45 changes: 45 additions & 0 deletions src/bitmessagekivy/kv/chat_room.kv
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#:import C kivy.utils.get_color_from_hex

<ChatRoom>:
name: 'chroom'
BoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.pos
size: self.size
ScrollView:
Label:
id: chat_logs
text: ''
color: C('#101010')
text_size: (self.width, None)
halign: 'left'
valign: 'top'
padding: (0, 0) # fixed in Kivy 1.8.1
size_hint: (1, None)
height: self.texture_size[1]
markup: True
font_size: sp(20)
BoxLayout:
height: 50
orientation: 'horizontal'
padding: 0
size_hint: (1, None)

TextInput:
id: message
size_hint: (1, 1)
multiline: False
font_size: sp(20)
on_text_validate: root.send_msg()

MDRaisedButton:
text: "Send"
elevation_normal: 2
opposite_colors: True
size_hint: (0.3, 1)
pos_hint: {"center_x": .5}
on_press: root.send_msg()
1 change: 1 addition & 0 deletions src/bitmessagekivy/kv/composer.kv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DropDownWidget>:
ScrollView:
id: id_scroll
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand Down
12 changes: 12 additions & 0 deletions src/bitmessagekivy/main.kv
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
source: app.get_default_logo()

ScrollView:
id: scroll_y
pos_hint: {"top": 1}

GridLayout:
Expand Down Expand Up @@ -155,6 +156,13 @@
on_release: app.root.ids.scr_mngr.current = 'allmails'
on_release: root.parent.set_state()
on_press: app.load_screen(self)
NavigationItem:
id: chat_rm
text: 'Chat Room'
icon: 'wechat'
divider: None
on_release: app.root.ids.scr_mngr.current = 'chlist'
on_release: root.parent.set_state()
NavigationDrawerDivider:
NavigationDrawerSubheader:
text: "All labels"
Expand Down Expand Up @@ -260,6 +268,10 @@ NavigationLayout:
id:sc19
Archieve:
id:sc20
ChatRoom:
id:sc21
ChatList:
id:sc22

MDNavigationDrawer:
id: nav_drawer
Expand Down
Loading

0 comments on commit a03d2cc

Please sign in to comment.