mediaviews.kv 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Goblinoid: Experience all of MediaGoblin on an Android Device
  2. # Copyright (C) 2015 Dylan Jeffers
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #:import utils kivy.utils
  17. <UploadView>
  18. BoxLayout:
  19. orientation: 'vertical'
  20. padding_y: sp(40)
  21. BoxLayout:
  22. size_hint_y: None
  23. height: sp(40)
  24. AsyncImage:
  25. id: img
  26. source: root.upload_image
  27. allow_stretch: True
  28. BoxLayout:
  29. size_hint_y: None
  30. height: sp(30)
  31. BoxLayout:
  32. size_hint_y: None
  33. padding: sp(20),0,sp(20),0
  34. TextInput:
  35. id: title
  36. background_color: [1,1,1,0.15]
  37. foreground_color: [1,1,1,1]
  38. hint_text_color: [1,1,1,1]
  39. font_size: sp(25)
  40. hint_text: 'Title...'
  41. size_hint_y: None
  42. padding_y: sp(10)
  43. padding_x: sp(15)
  44. height: self.minimum_height
  45. Button:
  46. background_normal: ''
  47. background_down: 'atlas://data/images/defaulttheme/button'
  48. background_color: utils.get_color_from_hex("#86D4B1")
  49. size_hint: None, None
  50. height: title.height
  51. width: sp(60)
  52. on_release: root.upload_media()
  53. Image:
  54. source: 'images/send_icon.png'
  55. size_hint_y: None
  56. height: self.parent.height / 2
  57. x: self.parent.x + (self.parent.width / 2 - self.width / 2)
  58. y: self.parent.y + (self.parent.height / 2 - self.height / 2)
  59. BoxLayout:
  60. padding: sp(20),0,sp(20),0
  61. size_hint_y: None
  62. height: desc.height
  63. TextInput:
  64. id: desc
  65. background_color: [1,1,1,0.15]
  66. foreground_color: [1,1,1,1]
  67. hint_text_color: [1,1,1,1]
  68. font_size: sp(20)
  69. hint_text: 'Description...'
  70. size_hint_y: None
  71. height: self.minimum_height * 1.55 if self.minimum_height < sp(50) else self.minimum_height
  72. padding_x: sp(15)
  73. padding_y: sp(10)
  74. BoxLayout:
  75. size_hint_y: None
  76. height: sp(40)