Add a CSS style test for gradients
This mainly just tests that gradients are properly reproduced by gtk_style_context_to_string.
This commit is contained in:
		@ -30,6 +30,7 @@ test_css_style_SOURCES = \
 | 
			
		||||
 | 
			
		||||
test_data = \
 | 
			
		||||
        currentcolor.ui currentcolor.css        currentcolor.nodes      \
 | 
			
		||||
        gradient.ui     gradient.css            gradient.nodes          \
 | 
			
		||||
        inherit.ui      inherit.css             inherit.nodes           \
 | 
			
		||||
	label.ui	label.css	        label.nodes             \
 | 
			
		||||
	nth-child.ui	nth-child.css	        nth-child.nodes         \
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								testsuite/css/style/gradient.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								testsuite/css/style/gradient.css
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
			
		||||
window {
 | 
			
		||||
  background-image: linear-gradient(75deg, red, green 20%, blue 40px);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
box {
 | 
			
		||||
  background-image: repeating-linear-gradient(to top right, rgba(255,100,60,0.5), magenta 100%);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
label {
 | 
			
		||||
  background-image: radial-gradient(farthest-corner at 50% 30px, yellow, red 30%, blue);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								testsuite/css/style/gradient.nodes
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								testsuite/css/style/gradient.nodes
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
[window.background:dir(ltr)]
 | 
			
		||||
  background-image: linear-gradient(75deg, rgb(255,0,0), rgb(0,128,0) 20%, rgb(0,0,255) 40px); /* gradient.css:2:69 */
 | 
			
		||||
 | 
			
		||||
  decoration:dir(ltr)
 | 
			
		||||
  box.horizontal:dir(ltr)
 | 
			
		||||
    background-image: repeating-linear-gradient(to top right, rgba(255,100,60,0.5), rgb(255,0,255) 100%); /* gradient.css:6:95 */
 | 
			
		||||
 | 
			
		||||
    label:dir(ltr)
 | 
			
		||||
      background-image: radial-gradient(circle farthest-corner at center 30px, rgb(255,255,0), rgb(255,0,0) 30%, rgb(0,0,255)); /* gradient.css:10:87 */
 | 
			
		||||
							
								
								
									
										18
									
								
								testsuite/css/style/gradient.ui
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								testsuite/css/style/gradient.ui
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,18 @@
 | 
			
		||||
<?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="GtkBox">
 | 
			
		||||
        <property name="visible">1</property>
 | 
			
		||||
        <child>
 | 
			
		||||
          <object class="GtkLabel">
 | 
			
		||||
            <property name="visible">1</property>
 | 
			
		||||
          </object>
 | 
			
		||||
        </child>
 | 
			
		||||
      </object>
 | 
			
		||||
    </child>
 | 
			
		||||
  </object>
 | 
			
		||||
</interface>
 | 
			
		||||
		Reference in New Issue
	
	Block a user