From f31c8c1b567cb3c2c0704ef1edb982999f96fd74 Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Date: Wed, 5 Jun 2013 11:47:10 +0200
Subject: [PATCH] Replace backgroundColor with backgroundVisible

This exposes backgroundVisible to TableView and
replaces backgroundColor in TextArea.

We think the backgroundVisible is more flexible and allows us
to find a more appropriate solution to support palette in the
future.

Change-Id: Icfcd512c29cf030059c4ce2d32feb402d1a33662
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
---
 src/controls/TableView.qml | 10 ++++++++++
 src/controls/TextArea.qml  |  9 ++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index fad6ee47a..c02123918 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -123,6 +123,16 @@ ScrollView {
         The default value is \c true. */
     property bool headerVisible: true
 
+    /*! \qmlproperty bool TableView::backgroundVisible
+
+        This property determines if the background should be filled or not.
+
+        The default value is \c true.
+
+        \note The rowDelegate is not affected by this property
+    */
+    property alias backgroundVisible: colorRect.visible
+
     /*! This property defines a delegate to draw a specific cell.
 
     In the item delegate you have access to the following special properties:
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 84f67b23c..fd715a36c 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -599,14 +599,13 @@ ScrollView {
         edit.undo();
     }
 
-    /*!
-        \qmlproperty color TextArea::backgroundColor
+    /*! \qmlproperty bool TextArea::backgroundVisible
 
-        This property sets the background color of the viewport.
+        This property determines if the background should be filled or not.
 
-        The default value is the base color of the SystemPalette.
+        The default value is \c true.
     */
-    property alias backgroundColor: colorRect.color
+    property alias backgroundVisible: colorRect.visible
 
     /*! \internal */
     default property alias data: area.data
-- 
GitLab