From e22dd3f3db39b8bd067600c414c6c889ab35cd3e Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Tue, 8 Jan 2013 15:29:52 +0200 Subject: Fixes issue where close indicator becomes invisible for tabs without an icon in Firefox using the minimal style for the tabsheet #10616 Change-Id: I0dfd5af048d34d3f0671a40b22aed273ca0b0581 --- .../reindeer/tabsheet/tabsheet-minimal-style.scss | 2 +- .../tabsheet/TabsheetMinimalClosableTabs.html | 27 +++++++++++++ .../tabsheet/TabsheetMinimalClosableTabs.java | 44 ++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html create mode 100644 uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss index 75ce9e1094..a3c8afdcf4 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss @@ -107,7 +107,7 @@ .#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close { margin-top: 1px; } -.v-ff & .#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close { +.v-ff & .#{$primaryStyleName}-tabs-minimal .v-icon + .#{$primaryStyleName}-caption-close { margin-top: -15px; } .#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close:hover, diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html new file mode 100644 index 0000000000..799e844e04 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html @@ -0,0 +1,27 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.tabsheet.TabsheetMinimalClosableTabs?restartApplication
screenCapture
+ + diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java new file mode 100644 index 0000000000..ebfee0adb0 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java @@ -0,0 +1,44 @@ +package com.vaadin.tests.components.tabsheet; + +import com.vaadin.server.ExternalResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Label; +import com.vaadin.ui.TabSheet; +import com.vaadin.ui.TabSheet.Tab; +import com.vaadin.ui.themes.Reindeer; + +public class TabsheetMinimalClosableTabs extends TestBase { + + @Override + protected void setup() { + TabSheet ts = new TabSheet(); + for (int tab = 0; tab < 5; tab++) { + String tabCaption = "Tab"; + for (int c = 0; c < tab; c++) { + tabCaption += tabCaption; + } + tabCaption += " " + tab; + + Tab t = ts.addTab(new Label("Content " + tab), tabCaption); + t.setClosable(true); + + if (tab % 2 == 0) { + t.setIcon(new ExternalResource( + "/VAADIN/themes/tests-tickets/icons/fi.gif")); + } + } + + ts.addStyleName(Reindeer.TABSHEET_MINIMAL); + addComponent(ts); + } + + @Override + protected String getDescription() { + return "Minimal theme should also show the close button in all browsers"; + } + + @Override + protected Integer getTicketNumber() { + return 10610; + } +} -- cgit v1.2.3