moved legend to top right in LeaderboardGroupPanel; doesn't look nice yet

This commit is contained in:
Axel Uhl committed 2012-12-04 21:32:53 +01:00
1 parent 8b16ebafe4
commit 50b5849b1c
2 files changed
+38 -22

No files matched your search

+12 -1
View File
@@ -274,13 +274,20 @@ input.magnifier {
color: #fff;
}
.leaderboardGroupPanel-ActiveRace:hover, .leaderboardGroupPanel-ActiveLeaderboard:hover, .leaderboardGroupPanel-ActiveButton:hover {
.leaderboardGroupPanel-ActiveLeaderboard:hover, .leaderboardGroupPanel-ActiveButton:hover {
text-decoration: none;
color: #fff;
background: url("images/btn-cta-orangeleft.png") repeat-x -10px -30px #e7e7e7;
/*border: 1px solid #f1af10;*/
}
.leaderboardGroupPanel-ActiveRace:hover {
text-decoration: none;
color: #fff;
background: url("images/btn-cta-blueleft.png") repeat-x -10px -30px #e7e7e7;
/*border: 1px solid #f1af10;*/
}
.leaderboardGroupPanel-LiveRace:hover {
text-decoration: none;
color: #fff;
@@ -288,6 +295,10 @@ input.magnifier {
/*border: 1px solid #f1af10;*/
}
.leaderboardGroupPanel-Legend {
float: right;
}
.welcomeWidget-WelcomePanel{
float: left;
max-width: 1000px;
@@ -180,27 +180,8 @@ public class LeaderboardGroupPanel extends FormPanel implements HasWelcomeWidget
labelAndLegendPanel.add(leaderboardsTableLabel, DockPanel.WEST);
// legend
if (!isEmbedded) {
HorizontalPanel legendPanel = new HorizontalPanel();
legendPanel.setStyleName(STYLE_LEGEND);
legendPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
legendPanel.setSpacing(5);
labelAndLegendPanel.add(legendPanel, DockPanel.EAST);
Label legendLabel = new Label(stringMessages.legend() + ":");
legendLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
legendPanel.add(legendLabel);
Label inactiveRace = new Label(stringMessages.untracked());
inactiveRace.setStyleName(STYLE_INACTIVE_RACE);
legendPanel.add(inactiveRace);
Label activeRace = new Label(stringMessages.tracked());
activeRace.setStyleName(STYLE_ACTIVE_RACE);
legendPanel.add(activeRace);
Label liveRace = new Label(stringMessages.live());
liveRace.setStyleName(STYLE_LIVE_RACE);
legendPanel.add(liveRace);
HorizontalPanel legendPanel = createLegendPanel();
labelAndLegendPanel.add(legendPanel, DockPanel.CENTER);
}
mainPanel.add(labelAndLegendPanel);
@@ -275,6 +256,30 @@ public class LeaderboardGroupPanel extends FormPanel implements HasWelcomeWidget
}
private HorizontalPanel createLegendPanel() {
HorizontalPanel legendPanel = new HorizontalPanel();
legendPanel.setStyleName(STYLE_LEGEND);
legendPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
legendPanel.setSpacing(5);
Label legendLabel = new Label(stringMessages.legend() + ":");
legendLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
legendPanel.add(legendLabel);
Label inactiveRace = new Label(stringMessages.untracked());
inactiveRace.setStyleName(STYLE_INACTIVE_RACE);
legendPanel.add(inactiveRace);
Label activeRace = new Label(stringMessages.tracked());
activeRace.setStyleName(STYLE_ACTIVE_RACE);
legendPanel.add(activeRace);
Label liveRace = new Label(stringMessages.live());
liveRace.setStyleName(STYLE_LIVE_RACE);
legendPanel.add(liveRace);
return legendPanel;
}
private String shortenLeaderboardName(String prefixToCut, String leaderboardName) {
String result = leaderboardName.substring(prefixToCut.length(), leaderboardName.length());
result = result.trim();