[gtk+/parser: 79/80] tests: Add a test for correct entry text clipping when drawing progress



commit 621553780e4688881bd7054e8833665bd357ad91
Author: Benjamin Otte <otte redhat com>
Date:   Tue Apr 19 22:15:24 2011 +0200

    tests: Add a test for correct entry text clipping when drawing progress

 tests/css/matching/Makefile.am                    |    3 +
 tests/css/matching/entry-progress-coloring.css    |   22 ++++
 tests/css/matching/entry-progress-coloring.ref.ui |  113 +++++++++++++++++++++
 tests/css/matching/entry-progress-coloring.ui     |   76 ++++++++++++++
 4 files changed, 214 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/matching/Makefile.am b/tests/css/matching/Makefile.am
index 68b97e5..aaec000 100644
--- a/tests/css/matching/Makefile.am
+++ b/tests/css/matching/Makefile.am
@@ -25,6 +25,9 @@ clean-local:
 	rm -rf output/ || true
 
 EXTRA_DIST += \
+	entry-progress-coloring.css \
+	entry-progress-coloring.ref.ui \
+	entry-progress-coloring.ui \
 	label-sizing.css \
 	label-sizing.ref.ui \
 	label-sizing.ui \
diff --git a/tests/css/matching/entry-progress-coloring.css b/tests/css/matching/entry-progress-coloring.css
new file mode 100644
index 0000000..e55a7df
--- /dev/null
+++ b/tests/css/matching/entry-progress-coloring.css
@@ -0,0 +1,22 @@
+* {  
+  -GtkWidget-interior-focus: false;
+  -GtkWidget-focus-line-width: 10;
+  padding: 0;
+  engine: none;
+  font: Monospace;
+}
+
+GtkEntry #padded {
+  -GtkWidget-interior-focus: true;
+  padding: 10;
+}
+
+.progressbar {
+  background-color: rgba(0,0,0,0);
+  border-color: rgba(0,0,0,0);
+  color: red;
+}
+
+#reference {
+  color: red;
+}
diff --git a/tests/css/matching/entry-progress-coloring.ref.ui b/tests/css/matching/entry-progress-coloring.ref.ui
new file mode 100644
index 0000000..10240fd
--- /dev/null
+++ b/tests/css/matching/entry-progress-coloring.ref.ui
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="entry1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="text" translatable="yes">000</property>
+                <property name="name">reference</property>
+                <property name="width_chars">6</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEventBox" id="eventbox4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="entry2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="text" translatable="yes">000</property>
+                <property name="name">reference</property>
+                <property name="width_chars">6</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEventBox" id="eventbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="entry4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="text" translatable="yes">000</property>
+                <property name="name">reference</property>
+                <property name="width_chars">6</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEventBox" id="eventbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="entry3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="text" translatable="yes">000</property>
+                <property name="name">reference</property>
+                <property name="width_chars">6</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/css/matching/entry-progress-coloring.ui b/tests/css/matching/entry-progress-coloring.ui
new file mode 100644
index 0000000..2e6bdea
--- /dev/null
+++ b/tests/css/matching/entry-progress-coloring.ui
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEntry" id="entry1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="width_chars">6</property>
+            <property name="text" translatable="yes">000</property>
+            <property name="progress_fraction">0.5</property>
+            <property name="name">padded</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entry2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="width_chars">6</property>
+            <property name="text" translatable="yes">000</property>
+            <property name="progress_fraction">0.5</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entry4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="width_chars">6</property>
+            <property name="text" translatable="yes">000</property>
+            <property name="progress_fraction">0.5</property>
+            <property name="name">padded</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entry3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="width_chars">6</property>
+            <property name="text" translatable="yes">000</property>
+            <property name="progress_fraction">0.5</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]