]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix readonly checkbox opacity in Valo. (#17548)
authorSauli Tähkäpää <sauli@vaadin.com>
Mon, 27 Apr 2015 19:05:35 +0000 (22:05 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 9 Jun 2015 16:05:21 +0000 (16:05 +0000)
Change-Id: I633e0deeca6c1268937d8c9b918ea414355c85f3

WebContent/VAADIN/themes/valo/components/_checkbox.scss
uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java
uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java

index 7283c4cbbf832c3276abb73870cca09740d9c94d..1be12d35338c1c3ef86a613f3cda619f12a047dd 100644 (file)
     }
   }
 
+  &.v-readonly {
+    > label,
+    > .v-icon {
+      cursor: default;
+    }
+
+    > label > .v-icon {
+      cursor: default;
+    }
+
+    :root & > input:active ~ label:after {
+      background: transparent;
+    }
+
+    :root & > input ~ label:after {
+      @include opacity($v-disabled-opacity);
+    }
+  }
+
+
 }
index c79447bd8698ae2d1600af1b2ee40ce7f01f58aa..9a889b3bdaf189d247f9a7b3dba49bbee7348486 100644 (file)
@@ -84,6 +84,11 @@ public class CheckBoxes extends VerticalLayout implements View {
         check.setIcon(testIcon.get());
         row.addComponent(check);
 
+        check = new CheckBox("Readonly", true);
+        check.setReadOnly(true);
+        check.setIcon(testIcon.get());
+        row.addComponent(check);
+
         h1 = new Label("Option Groups");
         h1.addStyleName("h1");
         addComponent(h1);
index 3ab224f105f66a8c3550c25ae419dc120653530e..4ed7e33e131bf3b809f53d9de8a134749b509279 100644 (file)
@@ -86,7 +86,7 @@ public class ValoThemeUITest extends MultiBrowserTest {
     public void checkboxes() throws Exception {
         openTestURL("test");
         open("Check Boxes & Option Groups", "Check Boxes");
-        compareScreen("checkboxes_with_disabled");
+        compareScreen("checkboxes_with_readonly");
     }
 
     @Test