Skip to content

Commit

Permalink
Merge pull request #3155 from axpoems/center-metrics-in-profile-overview
Browse files Browse the repository at this point in the history
Improvements in profile card
  • Loading branch information
axpoems authored Jan 31, 2025
2 parents ad1c1ec + f7efef9 commit 99f0352
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private View(Model model, Controller controller, int iconSize, boolean useMateri
dropdownMenu.setContent(userProfileDisplay);
dropdownMenu.useSpaceBetweenContentAndIcon();

singleUserProfileDisplay = new UserProfileDisplay(iconSize, false);
singleUserProfileDisplay = new UserProfileDisplay(iconSize, true);
singleUserProfileHBox = new HBox(singleUserProfileDisplay);
singleUserProfileHBox.getStyleClass().add("single-user-profile");
singleUserProfileHBox.setFillHeight(true);
Expand All @@ -282,7 +282,7 @@ protected void onViewAttached() {
selectedUserProfilePin = EasyBind.subscribe(model.getSelectedUserIdentity(), selectedUserIdentity -> {
userProfileDisplay.setUserProfile(selectedUserIdentity.getUserProfile(), false);
userProfileDisplay.setReputationScore(model.getUserReputationScore());
singleUserProfileDisplay.setUserProfile(selectedUserIdentity.getUserProfile(), false);
singleUserProfileDisplay.setUserProfile(selectedUserIdentity.getUserProfile(), true);
singleUserProfileDisplay.setReputationScore(model.getUserReputationScore());
model.getUserProfiles().forEach(userProfileMenuItem ->
userProfileMenuItem.updateSelection(selectedUserIdentity.equals(userProfileMenuItem.getUserIdentity())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ private VBox createAndGetTitleAndMetricBox(String title, Label detailsLabel, Lab
unitLabel.getStyleClass().addAll("text-fill-grey-dimmed", "medium-text");
HBox detailsAndUnitHBox = new HBox(3, detailsLabel, unitLabel);
detailsAndUnitHBox.setAlignment(Pos.BASELINE_CENTER);
return new VBox(titleLabel, detailsAndUnitHBox);
VBox vBox = new VBox(titleLabel, detailsAndUnitHBox);
vBox.setAlignment(Pos.CENTER);
return vBox;
}

private Region getLine() {
Expand Down

0 comments on commit 99f0352

Please sign in to comment.