From 72a78d1e166a143e75c6c7f121aeed797a589612 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Tue, 26 Jan 2016 15:52:11 +0000 Subject: [PATCH] Download and close buttons' widths is now the same git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/image-previewer-widget@122527 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../widgets/imagepreviewerwidget/client/ui/Carousel.java | 6 ++++-- .../widgets/imagepreviewerwidget/client/ui/Carousel.ui.xml | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) 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; }