summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/valo/components/_checkbox.scss20
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java5
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java2
3 files changed, 26 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_checkbox.scss b/WebContent/VAADIN/themes/valo/components/_checkbox.scss
index 7283c4cbbf..1be12d3533 100644
--- a/WebContent/VAADIN/themes/valo/components/_checkbox.scss
+++ b/WebContent/VAADIN/themes/valo/components/_checkbox.scss
@@ -144,4 +144,24 @@
}
}
+ &.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);
+ }
+ }
+
+
}
diff --git a/uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java b/uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java
index c79447bd86..9a889b3bda 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/CheckBoxes.java
@@ -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);
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java b/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java
index 3ab224f105..4ed7e33e13 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java
@@ -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