Revision: 7158 Author: j...@google.com Date: Tue Nov 24 14:14:51 2009 Log: A number of tweaks to the mail sample. Fix for the non-standard style names in SplitLayoutPanel. Review: bruce (desk check) http://code.google.com/p/google-web-toolkit/source/detail?r=7158
Added: /trunk/samples/mail/src/com/google/gwt/sample/mail/client/gwt-logo.png Modified: /trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.ui.xml /trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java /trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.java /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Tasks.ui.xml /trunk/samples/mail/src/com/google/gwt/sample/mail/client/global.css /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java ======================================= --- /dev/null +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/gwt-logo.png Tue Nov 24 14:14:51 2009 Binary file, no diff available. ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml Mon Nov 9 10:52:41 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml Tue Nov 24 14:14:51 2009 @@ -2,20 +2,40 @@ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:mail='urn:import:com.google.gwt.sample.mail.client'> + <ui:image field='logo' src='gwt-logo.png'/> + <ui:style> - .aboutText { + .panel { padding: 10px; + } + + .aboutText { text-align: left; } + + @sprite .logo { + gwt-image: 'logo'; + float: left; + padding-right: 1em; + } + + .buttons { + text-align: right; + } </ui:style> - <g:HTMLPanel width='24em'> + <g:HTMLPanel width='24em' styleName='{style.panel}'> + <div class='{style.logo}'/> + <div class='{style.aboutText}'> This sample application demonstrates the construction of a complex user interface using GWT's built-in widgets. Have a look at the code to see how easy it is to build your own apps! </div> - <g:Button text='Close' ui:field='closeButton' /> + + <div class='{style.buttons}'> + <g:Button text='Close' ui:field='closeButton' /> + </div> </g:HTMLPanel> </ui:UiBinder> ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.ui.xml Tue Nov 10 10:17:06 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.ui.xml Tue Nov 24 14:14:51 2009 @@ -8,6 +8,7 @@ .contacts { padding: 0.5em; + line-height: 150%; } .item { ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java Mon Nov 9 10:52:41 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java Tue Nov 24 14:14:51 2009 @@ -139,7 +139,6 @@ table.getCellFormatter().setWordWrap(i, 0, false); table.getCellFormatter().setWordWrap(i, 1, false); table.getCellFormatter().setWordWrap(i, 2, false); - table.getFlexCellFormatter().setColSpan(i, 2, 2); } } ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.java Mon Nov 9 10:52:41 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.java Tue Nov 24 14:14:51 2009 @@ -17,6 +17,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.Style.Visibility; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; @@ -46,9 +47,11 @@ } public void update(int startIndex, int count, int max) { - newerButton.setVisible(startIndex != 0); - olderButton.setVisible(startIndex + MailList.VISIBLE_EMAIL_COUNT < count); - countLabel.setInnerText("" + (startIndex + 1) + " - " + max + " of " + count); + setVisibility(newerButton, startIndex != 0); + setVisibility(olderButton, + startIndex + MailList.VISIBLE_EMAIL_COUNT < count); + countLabel.setInnerText("" + (startIndex + 1) + " - " + max + " of " + + count); } @UiHandler("newerButton") @@ -60,4 +63,9 @@ void onOlderClicked(ClickEvent event) { outer.older(); } -} + + private void setVisibility(Widget widget, boolean visible) { + widget.getElement().getStyle().setVisibility( + visible ? Visibility.VISIBLE : Visibility.HIDDEN); + } +} ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml Tue Nov 17 14:23:51 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml Tue Nov 24 14:14:51 2009 @@ -13,6 +13,7 @@ @sprite .stackHeader { gwt-image: 'gradient'; background-color: #b4b6bc; + cursor: pointer; text-shadow: rgba(255, 255, 255, 1) 0 1px 1px; font-size: 1.2em; ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Tasks.ui.xml Tue Nov 10 10:17:06 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Tasks.ui.xml Tue Nov 24 14:14:51 2009 @@ -6,6 +6,7 @@ <ui:style> .tasks { padding: 0.5em; + line-height: 150%; } .item { ======================================= --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/global.css Mon Nov 23 16:21:36 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/global.css Tue Nov 24 14:14:51 2009 @@ -8,7 +8,6 @@ } a:link, a:visited, a:hover, a:active { color: #000; - text-decoration: none; } /* Dialog boxes */ @@ -52,3 +51,12 @@ .gwt-Tree .gwt-TreeItem-selected { background: #ccc; } + +/* Splitters */ +.gwt-SplitLayoutPanel-HDragger { + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + cursor: row-resize; +} ======================================= --- /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java Tue Nov 3 14:14:13 2009 +++ /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java Tue Nov 24 14:14:51 2009 @@ -57,8 +57,8 @@ private class HSplitter extends Splitter { public HSplitter(Widget target, boolean reverse) { super(target, reverse); - getElement().getStyle().setPropertyPx("width", 4); - setStyleName("LayoutPanel-HDragger"); + getElement().getStyle().setPropertyPx("width", SPLITTER_SIZE); + setStyleName("gwt-SplitLayoutPanel-HDragger"); } @Override @@ -184,8 +184,8 @@ private class VSplitter extends Splitter { public VSplitter(Widget target, boolean reverse) { super(target, reverse); - getElement().getStyle().setPropertyPx("height", 4); - setStyleName("LayoutPanel-VDragger"); + getElement().getStyle().setPropertyPx("height", SPLITTER_SIZE); + setStyleName("gwt-SplitLayoutPanel-VDragger"); } @Override @@ -209,7 +209,7 @@ } } - private static final int SPLITTER_SIZE = 4; + private static final int SPLITTER_SIZE = 8; public SplitLayoutPanel() { super(Unit.PX); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors