Editing profile UI implemented.
This commit is contained in:
@@ -366,3 +366,81 @@
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #999;
|
||||
}
|
||||
|
||||
/* ===== Edit Profile Card ===== */
|
||||
.edit-profile-card {
|
||||
-fx-background-color: #0f1c26;
|
||||
-fx-background-radius: 10;
|
||||
-fx-padding: 16;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.6), 10, 0, 0, 4);
|
||||
}
|
||||
|
||||
/* ===== Header ===== */
|
||||
.edit-profile-title {
|
||||
-fx-font-size: 16px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #eee;
|
||||
}
|
||||
|
||||
.edit-icon-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-cursor: hand;
|
||||
-fx-text-fill: #eee;
|
||||
-fx-font-size: 14px;
|
||||
-fx-padding: 4;
|
||||
}
|
||||
|
||||
/* ===== Profile Picture ===== */
|
||||
.edit-profile-picture {
|
||||
-fx-background-radius: 50%;
|
||||
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.5), 4, 0, 0, 1);
|
||||
}
|
||||
|
||||
/* ===== Inputs ===== */
|
||||
.edit-profile-input {
|
||||
-fx-background-color: #1e2a35; /* darker background */
|
||||
-fx-background-radius: 6;
|
||||
-fx-border-radius: 6;
|
||||
-fx-border-color: #2e3c48;
|
||||
-fx-border-width: 1;
|
||||
-fx-padding: 6 10 6 10;
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #eee;
|
||||
}
|
||||
|
||||
.edit-profile-input:focused {
|
||||
-fx-border-color: #42a5f5; /* bright blue focus */
|
||||
-fx-background-color: #253443;
|
||||
}
|
||||
|
||||
.edit-input-description {
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #aaa;
|
||||
}
|
||||
|
||||
/* ===== Section Separators ===== */
|
||||
.edit-section-separator {
|
||||
-fx-background-color: #333;
|
||||
-fx-pref-height: 1;
|
||||
}
|
||||
|
||||
.profile-info-label {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #bbb; /* lighter gray for labels */
|
||||
-fx-font-weight: normal;
|
||||
}
|
||||
|
||||
.camera-button {
|
||||
-fx-background-color: #0088cc;
|
||||
-fx-background-radius: 50%;
|
||||
-fx-cursor: hand;
|
||||
-fx-padding: 4;
|
||||
-fx-border-color: white; /* white border to stand out */
|
||||
-fx-border-width: 2;
|
||||
-fx-border-radius: 50%;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.25), 4, 0, 0, 1);
|
||||
}
|
||||
|
||||
.camera-button:hover {
|
||||
-fx-background-color: #0077b6;
|
||||
}
|
||||
|
||||
@@ -364,3 +364,82 @@
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #888;
|
||||
}
|
||||
|
||||
/* ===== Edit Profile Card ===== */
|
||||
.edit-profile-card {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 10;
|
||||
-fx-padding: 16;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.25), 10, 0, 0, 4);
|
||||
}
|
||||
|
||||
/* ===== Header ===== */
|
||||
.edit-profile-title {
|
||||
-fx-font-size: 16px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #000;
|
||||
}
|
||||
|
||||
.edit-icon-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-cursor: hand;
|
||||
-fx-text-fill: #000;
|
||||
-fx-font-size: 14px;
|
||||
-fx-padding: 4;
|
||||
}
|
||||
|
||||
/* ===== Profile Picture ===== */
|
||||
.edit-profile-picture {
|
||||
-fx-background-radius: 50%;
|
||||
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.2), 4, 0, 0, 1);
|
||||
}
|
||||
|
||||
/* ===== Inputs ===== */
|
||||
.edit-profile-input {
|
||||
-fx-background-color: #f5f5f5; /* light gray background */
|
||||
-fx-background-radius: 6;
|
||||
-fx-border-radius: 6;
|
||||
-fx-border-color: #ddd;
|
||||
-fx-border-width: 1;
|
||||
-fx-padding: 6 10 6 10;
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #222;
|
||||
}
|
||||
|
||||
|
||||
.edit-profile-input:focused {
|
||||
-fx-border-color: #2196f3; /* blue highlight on focus */
|
||||
-fx-background-color: #fff;
|
||||
}
|
||||
|
||||
.edit-input-description {
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #666;
|
||||
}
|
||||
|
||||
/* ===== Section Separators ===== */
|
||||
.edit-section-separator {
|
||||
-fx-background-color: #ddd;
|
||||
-fx-pref-height: 1;
|
||||
}
|
||||
|
||||
.profile-info-label {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #444; /* darker gray for labels */
|
||||
-fx-font-weight: normal;
|
||||
}
|
||||
|
||||
.camera-button {
|
||||
-fx-background-color: #0088cc;
|
||||
-fx-background-radius: 50%;
|
||||
-fx-cursor: hand;
|
||||
-fx-padding: 4;
|
||||
-fx-border-color: white; /* white border to stand out */
|
||||
-fx-border-width: 2;
|
||||
-fx-border-radius: 50%;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.25), 4, 0, 0, 1);
|
||||
}
|
||||
|
||||
.camera-button:hover {
|
||||
-fx-background-color: #0077b6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<StackPane styleClass="overlay-root" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="org.to.telegramfinalproject.UI.EditProfileController">
|
||||
<children>
|
||||
|
||||
<!-- Background (click to close) -->
|
||||
<Pane fx:id="overlayBackground" styleClass="overlay-background" />
|
||||
|
||||
<!-- Profile edit card -->
|
||||
<VBox fx:id="editCard" maxHeight="520" maxWidth="400" prefHeight="520" prefWidth="400" spacing="16" styleClass="edit-profile-card">
|
||||
<children>
|
||||
|
||||
<!-- ===== Header: Back + Title + Close ===== -->
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<children>
|
||||
<!-- Back button -->
|
||||
<Button fx:id="backButton" styleClass="edit-icon-button" />
|
||||
|
||||
<!-- Title -->
|
||||
<Label styleClass="edit-profile-title" text="Edit Profile" HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Spacer pushes close button to the right -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Close button -->
|
||||
<Button fx:id="closeButton" styleClass="edit-icon-button" text="✕" />
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<!-- ===== Profile picture with camera overlay + name/status ===== -->
|
||||
<VBox alignment="CENTER" spacing="2">
|
||||
|
||||
<!-- Profile picture + camera button -->
|
||||
<StackPane alignment="CENTER">
|
||||
<!-- Profile Picture -->
|
||||
<ImageView fx:id="profileImageView"
|
||||
fitWidth="100" fitHeight="100"
|
||||
preserveRatio="true"
|
||||
styleClass="edit-profile-picture"/>
|
||||
|
||||
<!-- Camera Button pinned bottom-center -->
|
||||
<Button fx:id="cameraButton"
|
||||
prefWidth="32" prefHeight="32"
|
||||
styleClass="camera-button"
|
||||
StackPane.alignment="BOTTOM_CENTER"
|
||||
translateX="30" translateY="5"> <!-- pushes down so it overlaps -->
|
||||
<graphic>
|
||||
<ImageView fx:id="cameraIcon"
|
||||
fitWidth="16" fitHeight="16"
|
||||
preserveRatio="true"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
</StackPane>
|
||||
|
||||
<!-- Name + Status -->
|
||||
<Label fx:id="profileName" text="User Name" styleClass="profile-name"/>
|
||||
<Label fx:id="profileStatus" text="online" styleClass="profile-status"/>
|
||||
|
||||
</VBox>
|
||||
|
||||
|
||||
<Separator styleClass="edit-section-separator" />
|
||||
|
||||
<!-- ===== Bio (full width field + description) ===== -->
|
||||
<VBox spacing="4">
|
||||
<children>
|
||||
<TextField fx:id="bioField" promptText="Bio" styleClass="edit-profile-input" />
|
||||
<Label styleClass="edit-input-description" text="Any details such as age, occupation, or city." />
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
<Separator styleClass="section-separator" />
|
||||
|
||||
<!-- ===== Name row (Label left, editable field right) ===== -->
|
||||
<VBox spacing="4">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<children>
|
||||
<Label styleClass="profile-info-label" text="Name" />
|
||||
<TextField fx:id="nameField" prefHeight="25.0" prefWidth="152.0" styleClass="edit-profile-input" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Label styleClass="edit-input-description" text="This is your profile name. It will be visible to your contacts." />
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
<Separator styleClass="section-separator" />
|
||||
|
||||
<!-- ===== Username row (Label left, editable field right) ===== -->
|
||||
<VBox spacing="4">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<children>
|
||||
<Label styleClass="profile-info-label" text="Username" />
|
||||
<TextField fx:id="usernameField" prefHeight="25.0" prefWidth="153.0" styleClass="edit-profile-input" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Label styleClass="edit-input-description" text="Username lets people contact you." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</StackPane>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 173 B |
Binary file not shown.
|
After Width: | Height: | Size: 165 B |
Binary file not shown.
|
After Width: | Height: | Size: 288 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 985 B |
Reference in New Issue
Block a user