changeset 131:36fc269e2a32

core: changed default background color to white
author Goffi <goffi@goffi.org>
date Fri, 06 Apr 2018 16:12:58 +0200
parents 0ec3c3c0ed92
children 7ad965999d47
files cagou/core/cagou_main.py cagou/kv/base.kv cagou/kv/common.kv cagou/kv/menu.kv cagou/kv/root_widget.kv cagou/kv/xmlui.kv cagou/plugins/plugin_wid_chat.kv
diffstat 7 files changed, 28 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/core/cagou_main.py	Fri Apr 06 16:12:58 2018 +0200
@@ -64,6 +64,12 @@
 import cagou.kv
 from kivy import utils as kivy_utils
 import sys
+from kivy.core.window import Window
+
+# we want white background by default
+Window.clearcolor = (1, 1, 1, 1)
+
+
 if kivy_utils.platform == "android":
     # FIXME: move to separate android module
     kivy.support.install_android()
--- a/cagou/kv/base.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/kv/base.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -13,3 +13,10 @@
 
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+<Label>:
+    color: 0, 0, 0, 1
+
+<Button>:
+    color: 1, 1, 1, 1
--- a/cagou/kv/common.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/kv/common.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -35,3 +35,5 @@
         halign: 'left'
         valign: 'middle'
         padding_x: dp(20)
+
+
--- a/cagou/kv/menu.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/kv/menu.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -18,6 +18,7 @@
 
 <AboutContent>:
     text_size: self.size
+    color: 1, 1, 1, 1
     halign: "center"
     valign: "middle"
 
@@ -59,6 +60,7 @@
             text: _(u"send")
             group: "transfer"
     Label:
+        color: 1, 1, 1, 1
         size_hint: 1, 0.3
         text: root.transfer_txt if upload_btn.state == 'down' else root.send_txt
         text_size: self.size
@@ -82,6 +84,7 @@
         size_hint: 1, None
         height: dp(50)
     Label:
+        color: 1, 1, 1, 1
         text: root.plug_info['name']
         text_size: self.size
         halign: "center"
--- a/cagou/kv/root_widget.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/kv/root_widget.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -62,7 +62,7 @@
     size_hint: 1, None
     height: dp(35)
     IconButton:
-        source: app.expand("{media}/icons/muchoslava/png/cagou_profil_bleu_32.png") if root.notes else app.expand("{media}/misc/black.png")
+        source: app.expand("{media}/icons/muchoslava/png/cagou_profil_bleu_32.png") if root.notes else None
         allow_stretch: True
         size_hint: None, 1
         width: self.norm_image_size[0]
@@ -72,7 +72,7 @@
     NotifsIcon:
         id: notifs_icon
         allow_stretch: True
-        source: app.expand("{media}/icons/muchoslava/png/cagou_profil_bleu_32.png") if self.notifs else app.expand("{media}/misc/black.png")
+        source: app.expand("{media}/icons/muchoslava/png/cagou_profil_bleu_32.png") if self.notifs else None
         size_hint: None, 1
         width: self.norm_image_size[0]
 
--- a/cagou/kv/xmlui.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/kv/xmlui.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -20,6 +20,7 @@
 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>:
     size_hint: 1, None
     height: dp(common_height)
+    color: 1, 1, 1, 1
 
 
 <ButtonWidget>:
--- a/cagou/plugins/plugin_wid_chat.kv	Fri Apr 06 16:12:14 2018 +0200
+++ b/cagou/plugins/plugin_wid_chat.kv	Fri Apr 06 16:12:58 2018 +0200
@@ -30,6 +30,12 @@
     spacing: dp(5)
     size_hint: 1, None
     height: self.minimum_height
+    canvas.before:
+        Color:
+            rgba: 1, 1, 1, 1
+        Rectangle:
+            pos: self.pos
+            size: self.size
 
 <MessageWidget>:
     cols: 1
@@ -50,6 +56,7 @@
             id: avatar
         Label:
             id: time_label
+            color: (0, 0, 0, 1) if root.mess_data.own_mess else (0.55,0.55,0.55,1)
             text_size: None, None
             size_hint: None, None
             size: self.texture_size
@@ -73,13 +80,6 @@
         height: mess_xhtml.height
         on_size: root.widthAdjust()
         SimpleXHTMLWidget:
-            canvas.before:
-                Color:
-                    rgba: 1, 1, 1, 1
-                BorderImage:
-                    source: app.expand("{media}/misc/black.png") if root.mess_data.type == "info" else app.expand("{media}/misc/borders/{}.jpg", "blue" if root.mess_data.own_mess else "gray")
-                    pos: self.pos
-                    size: self.content_width, self.height
             id: mess_xhtml
             size_hint: 0.8, None
             height: self.minimum_height