diff --git a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java index 7a58404..624fbcc 100644 --- a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java +++ b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java @@ -86,10 +86,12 @@ public class Carousel extends Composite{ horizontaFooterPanel.setCellHorizontalAlignment(prevButton, HorizontalPanel.ALIGN_LEFT); horizontaFooterPanel.setCellHorizontalAlignment(nextButton, HorizontalPanel.ALIGN_RIGHT); - // set central buttons' cell widths to be equal TODO + // set central buttons' cell widths to be equal as well as their widths horizontaFooterPanel.setCellWidth(downloadButton, "200px"); horizontaFooterPanel.setCellWidth(closeButton, "200px"); - + downloadButton.setWidth("140px"); + closeButton.setWidth("140px"); + // set vertical alignment horizontaFooterPanel.setCellVerticalAlignment(nextButton, VerticalPanel.ALIGN_MIDDLE); horizontaFooterPanel.setCellVerticalAlignment(prevButton, VerticalPanel.ALIGN_MIDDLE); diff --git a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.ui.xml b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.ui.xml index 8ef7ca0..e169872 100644 --- a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.ui.xml @@ -2,6 +2,7 @@ + .image { margin: 0; position: relative; @@ -9,7 +10,10 @@ left: 50%; margin-right: -50%; transform: translate(-50%, -50%); - max-height: 95%; + -ms-transform: translate(-50%, -50%); /* IE 9 */ + -webkit-transform: translate(-50%, -50%); /* Safari */ + max-height: 100%; + max-width: 100%; width: auto; } @@ -64,6 +68,7 @@ position: relative; height: 90%; max-height: 100%; + max-width: 100%; padding: 0; overflow: hidden; }