outer.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
outer.setStyleName("pithos-topPanel");
+ HorizontalPanel inner = new HorizontalPanel();
+ inner.setWidth("75%");
+ inner.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
+
HTML logos = new HTML("<table><tr><td>" + AbstractImagePrototype.create(images.pithosLogo()).getHTML() + "</td></tr></table>");
- outer.add(logos);
+ logos.addStyleName("pithos-logo");
+ inner.add(logos);
MenuBar username = new MenuBar();
username.setStyleName("pithos-usernameMenu");
- username.setAutoOpen(true);
MenuBar userItemMenu = new MenuBar(true);
+ userItemMenu.addStyleName("pithos-userItemMenu");
+ userItemMenu.addItem(new MenuItem("invite friends...", new Command() {
+
+ @Override
+ public void execute() {
+ //Somehow get info from the server about invitations sent/left etc and then show the box
+ new InvitationsDialog().center();
+ }
+ }));
+ userItemMenu.addItem(new MenuItem("send feedback...", new Command() {
+
+ @Override
+ public void execute() {
+ new FeedbackDialog().center();
+ }
+ }));
userItemMenu.addItem(new MenuItem("API token", new Command() {
@Override
}
}));
- SafeHtmlBuilder sb = new SafeHtmlBuilder();
- sb.append(SafeHtmlUtils.fromSafeConstant(_app.getUsername()));
- sb.appendHtmlConstant(AbstractImagePrototype.create(images.downArrow()).getHTML());
MenuItem userItem = new MenuItem(_app.getUsername(), userItemMenu);
+ userItem.addStyleName("pithos-usernameMenuItem");
username.addItem(userItem);
- outer.add(username);
- outer.setCellHorizontalAlignment(username, HasHorizontalAlignment.ALIGN_RIGHT);
- Image downArrow = AbstractImagePrototype.create(images.downArrow()).createImage();
- outer.add(downArrow);
- outer.setCellHorizontalAlignment(downArrow, HasHorizontalAlignment.ALIGN_LEFT);
+ username.addSeparator();
+
+ MenuItem langItem = new MenuItem("en", (Command) null);
+ langItem.addStyleName("pithos-langMenuItem");
+ username.addItem(langItem);
+
+ inner.add(username);
+ inner.setCellHorizontalAlignment(username, HasHorizontalAlignment.ALIGN_RIGHT);
+
+ outer.add(inner);
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
+ outer.setCellVerticalAlignment(inner, HasVerticalAlignment.ALIGN_BOTTOM);
initWidget(outer);
}
}