Sidebar UI + backend updated.
This commit is contained in:
@@ -90,7 +90,7 @@ public class EditProfileController {
|
||||
|
||||
backButton.setOnAction(e -> {
|
||||
saveChangesAndClose();
|
||||
closeEdit(); // ← قبلاً goBack بود
|
||||
MainController.getInstance().goBack(overlayBackground);
|
||||
});
|
||||
|
||||
// Load your camera icon image (white camera icon for visibility)
|
||||
@@ -143,7 +143,6 @@ public class EditProfileController {
|
||||
}
|
||||
|
||||
private void closeEdit() {
|
||||
//MainController.getInstance().closeOverlay(editCard.getParent());
|
||||
// MainController.getInstance().goBack(overlayBackground);
|
||||
MainController.getInstance().closeOverlay(editCard.getParent());
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ public class MainController {
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void closeSidebar() {
|
||||
public void closeSidebar() {
|
||||
if (sidebarRoot != null && isSidebarOpen) {
|
||||
TranslateTransition slideOut = new TranslateTransition(Duration.millis(250), sidebarRoot);
|
||||
slideOut.setToX(-getSidebarWidth());
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SettingsController {
|
||||
populateFromSession();
|
||||
|
||||
// Make it circular
|
||||
Circle clip = new Circle(48, 28, 38); // centerX, centerY, radius
|
||||
Circle clip = new Circle(40, 30, 38); // centerX, centerY, radius
|
||||
profileImage.setClip(clip);
|
||||
|
||||
// Buttons
|
||||
@@ -223,11 +223,11 @@ public class SettingsController {
|
||||
|
||||
// ست کردن در UI
|
||||
profileName.setText(cachedName);
|
||||
profileId.setText(cachedUsername);
|
||||
profileId.setText("@" + cachedUsername);
|
||||
profileImage.setImage(cachedAvatar);
|
||||
|
||||
// گرد کردن تصویر (با توجه به اندازهی واقعی)
|
||||
Circle clip = new Circle(38, 38, 38); // centerX, centerY, radius
|
||||
Circle clip = new Circle(40, 30, 38); // centerX, centerY, radius
|
||||
profileImage.setClip(clip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,6 +324,7 @@ public class SidebarMenuController {
|
||||
boolean opened = false;
|
||||
try {
|
||||
MainController.getInstance().openChat(entry);
|
||||
MainController.getInstance().closeSidebar();
|
||||
opened = true;
|
||||
} catch (Throwable t) {
|
||||
// مسیر دوم: اگر با id/type باز میکنی، یا اول info میگیری:
|
||||
|
||||
Reference in New Issue
Block a user