diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2015-04-27 22:05:35 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-06-09 16:05:21 +0000 |
commit | 45fb2934f2104f97575fade34b96a56b5823e457 (patch) | |
tree | 1d3c4fd0148c802cedde50c0b8e4d84f8ed3b8e5 | |
parent | 4837e3838e22bf8699ac88a967ca6d5063df39d0 (diff) | |
download | vaadin-framework-45fb2934f2104f97575fade34b96a56b5823e457.tar.gz vaadin-framework-45fb2934f2104f97575fade34b96a56b5823e457.zip |
Fix readonly checkbox opacity in Valo. (#17548)
Change-Id: I633e0deeca6c1268937d8c9b918ea414355c85f3
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 |