summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni@vaadin.com>2014-06-12 15:53:58 +0300
committerJouni Koivuviita <jouni@vaadin.com>2014-06-18 07:55:40 +0000
commit61a76c2013bc0c0c93ac542fd6aa15140a4ed1e2 (patch)
tree102ca8eabbd4aa448b5f1a2d6b7dba3c79870429
parent3c4aba8a796da518feda8dab8c04502ef492241b (diff)
downloadvaadin-framework-61a76c2013bc0c0c93ac542fd6aa15140a4ed1e2.tar.gz
vaadin-framework-61a76c2013bc0c0c93ac542fd6aa15140a4ed1e2.zip
Update ValoThemeTest with a few new styles
Change-Id: Icfc9a960d7d022ec5394be2853f80775be41549d
-rw-r--r--WebContent/VAADIN/themes/tests-valo/_blueprint.scss1
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java38
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/PopupViews.java35
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/Sliders.java9
4 files changed, 59 insertions, 24 deletions
diff --git a/WebContent/VAADIN/themes/tests-valo/_blueprint.scss b/WebContent/VAADIN/themes/tests-valo/_blueprint.scss
index a876a5a528..696da0b69e 100644
--- a/WebContent/VAADIN/themes/tests-valo/_blueprint.scss
+++ b/WebContent/VAADIN/themes/tests-valo/_blueprint.scss
@@ -6,6 +6,7 @@ $v-overlay-background-color: $v-background-color;
$valo-menu-background-color: $v-background-color;
$v-overlay-shadow: 0 0 0 1px rgba(#fff, .5);
$v-window-shadow: $v-overlay-shadow;
+$v-window-modality-curtain-background-color: $v-background-color;
$v-bevel: false;
$v-gradient: false;
$v-shadow: false;
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java b/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
index 8f7b7c6a00..ce08d9ba08 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * Copyright 2000-2014 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -66,26 +66,6 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
button.addStyleName("danger");
row.addComponent(button);
- // button = new Button("Custom");
- // button.addStyleName("color2");
- // row.addComponent(button);
- //
- // button = new Button("User Color");
- // button.addStyleName("color3");
- // row.addComponent(button);
- //
- // button = new Button("Themed");
- // button.addStyleName("color4");
- // row.addComponent(button);
- //
- // button = new Button("Alternate");
- // button.addStyleName("color5");
- // row.addComponent(button);
- //
- // button = new Button("Other");
- // button.addStyleName("color6");
- // row.addComponent(button);
-
button = new Button("Small");
button.addStyleName("small");
button.setIcon(TestIcon.get());
@@ -93,7 +73,11 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
button = new Button("Large");
button.addStyleName("large");
- button.addStyleName("icon-align-right");
+ button.setIcon(TestIcon.get());
+ row.addComponent(button);
+
+ button = new Button("Top");
+ button.addStyleName("icon-align-top");
button.setIcon(TestIcon.get());
row.addComponent(button);
@@ -120,6 +104,16 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
button.addStyleName("borderless");
row.addComponent(button);
+ button = new Button("Borderless, colored");
+ button.setIcon(TestIcon.get());
+ button.addStyleName("borderless-colored");
+ row.addComponent(button);
+
+ button = new Button("Quiet");
+ button.setIcon(TestIcon.get());
+ button.addStyleName("quiet");
+ row.addComponent(button);
+
button = new Button("Link style");
button.setIcon(TestIcon.get());
button.addStyleName("link");
diff --git a/uitest/src/com/vaadin/tests/themes/valo/PopupViews.java b/uitest/src/com/vaadin/tests/themes/valo/PopupViews.java
index b13544c26a..c15270400c 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/PopupViews.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/PopupViews.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * Copyright 2000-2014 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -17,6 +17,7 @@ package com.vaadin.tests.themes.valo;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
+import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
@@ -43,6 +44,7 @@ public class PopupViews extends VerticalLayout implements View {
return new VerticalLayout() {
{
setMargin(true);
+ setWidth("300px");
addComponent(new Label(
"Fictum, deserunt mollit anim laborum astutumque! Magna pars studiorum, prodita quaerimus."));
}
@@ -54,9 +56,40 @@ public class PopupViews extends VerticalLayout implements View {
return "Click to view";
}
});
+ row.addComponent(pv);
+ pv.setHideOnMouseOut(true);
+ pv.setCaption("Hide on mouse-out");
+
+ pv = new PopupView(new Content() {
+ int count = 0;
+
+ @Override
+ public Component getPopupComponent() {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ }
+ return new VerticalLayout() {
+ {
+ setMargin(true);
+ addComponent(new Label(
+ "<h3>Thanks for waiting!</h3><p>You've opened this popup <b>"
+ + ++count + " time"
+ + (count > 1 ? "s" : " only")
+ + "</b>.</p>", ContentMode.HTML));
+ }
+ };
+ }
+
+ @Override
+ public String getMinimizedValueAsHTML() {
+ return "Show slow loading content";
+ }
+ });
row.addComponent(pv);
pv.setHideOnMouseOut(false);
+ pv.setCaption("Hide on click-outside");
}
@Override
diff --git a/uitest/src/com/vaadin/tests/themes/valo/Sliders.java b/uitest/src/com/vaadin/tests/themes/valo/Sliders.java
index 516254cb40..a39b67ba5d 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/Sliders.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/Sliders.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * Copyright 2000-2014 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -76,6 +76,13 @@ public class Sliders extends VerticalLayout implements View {
slider.addStyleName("ticks");
row.addComponent(slider);
+ slider = new Slider("Toggle imitation");
+ slider.setWidth("50px");
+ slider.setResolution(0);
+ slider.setMin(0);
+ slider.setMax(1);
+ row.addComponent(slider);
+
slider = new Slider("Vertical");
slider.setValue(50.0);
slider.setOrientation(SliderOrientation.VERTICAL);