My Profile UI implemented.
This commit is contained in:
@@ -294,3 +294,75 @@
|
||||
-fx-background-radius: 10;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
/* ===== Overlay ===== */
|
||||
.overlay-root {
|
||||
-fx-alignment: CENTER;
|
||||
}
|
||||
|
||||
.overlay-background {
|
||||
-fx-background-color: transparent;
|
||||
-fx-pref-width: 100%;
|
||||
-fx-pref-height: 100%;
|
||||
}
|
||||
|
||||
/* ===== Profile Card ===== */
|
||||
.profile-card {
|
||||
-fx-background-color: #0f1c26;
|
||||
-fx-background-radius: 10;
|
||||
-fx-padding: 16;
|
||||
-fx-max-width: 320;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.6), 12, 0, 0, 4);
|
||||
}
|
||||
|
||||
/* ===== Header ===== */
|
||||
.profile-title {
|
||||
-fx-font-size: 16px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #eee;
|
||||
}
|
||||
.icon-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-padding: 4;
|
||||
-fx-cursor: hand;
|
||||
-fx-text-fill: #fff;
|
||||
}
|
||||
|
||||
/* ===== Text Styles ===== */
|
||||
.profile-name {
|
||||
-fx-font-size: 18px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #eee;
|
||||
}
|
||||
|
||||
.profile-status {
|
||||
-fx-font-size: 12px;
|
||||
-fx-text-fill: #2196f3; /* online */
|
||||
}
|
||||
|
||||
.profile-bio {
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #bbb;
|
||||
}
|
||||
|
||||
.profile-id {
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #999;
|
||||
}
|
||||
|
||||
/* Section separators */
|
||||
.section-separator {
|
||||
-fx-background-color: #223446;
|
||||
-fx-pref-height: 2;
|
||||
}
|
||||
|
||||
/* Info text */
|
||||
.profile-info-main {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #eee;
|
||||
}
|
||||
|
||||
.profile-info-sub {
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #999;
|
||||
}
|
||||
|
||||
@@ -293,3 +293,74 @@
|
||||
-fx-background-radius: 10;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
/* ===== Overlay ===== */
|
||||
.overlay-root {
|
||||
-fx-alignment: CENTER;
|
||||
}
|
||||
|
||||
.overlay-background {
|
||||
-fx-background-color: rgba(0, 0, 0, 0.4);
|
||||
-fx-pref-width: 100%;
|
||||
-fx-pref-height: 100%;
|
||||
}
|
||||
|
||||
/* ===== Profile Card ===== */
|
||||
.profile-card {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 10;
|
||||
-fx-padding: 16;
|
||||
-fx-max-width: 320;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.35), 12, 0, 0, 4);
|
||||
}
|
||||
|
||||
/* ===== Header ===== */
|
||||
.profile-title {
|
||||
-fx-font-size: 16px;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
.icon-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-padding: 4;
|
||||
-fx-cursor: hand;
|
||||
-fx-text-fill: #000;
|
||||
}
|
||||
|
||||
/* ===== Text Styles ===== */
|
||||
.profile-name {
|
||||
-fx-font-size: 18px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #222;
|
||||
}
|
||||
|
||||
.profile-status {
|
||||
-fx-font-size: 12px;
|
||||
-fx-text-fill: #2196f3; /* online */
|
||||
}
|
||||
|
||||
.profile-bio {
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #555;
|
||||
}
|
||||
|
||||
.profile-id {
|
||||
-fx-font-size: 13px;
|
||||
-fx-text-fill: #888;
|
||||
}
|
||||
|
||||
/* Section separators */
|
||||
.section-separator {
|
||||
-fx-background-color: #ddd;
|
||||
-fx-pref-height: 2;
|
||||
}
|
||||
|
||||
/* Info text */
|
||||
.profile-info-main {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #222;
|
||||
}
|
||||
|
||||
.profile-info-sub {
|
||||
-fx-font-size: 11px;
|
||||
-fx-text-fill: #888;
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
.my-profile-root {
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.profile-image {
|
||||
-fx-clip-radius: 40; /* Rounded image */
|
||||
}
|
||||
|
||||
.profile-name {
|
||||
-fx-font-size: 18px;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
.profile-status {
|
||||
-fx-text-fill: green;
|
||||
-fx-font-size: 14px;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #333;
|
||||
}
|
||||
|
||||
.field-value {
|
||||
-fx-text-fill: #555;
|
||||
}
|
||||
@@ -1,40 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<AnchorPane xmlns:fx="http://javafx.com/fxml" fx:controller="org.to.telegramfinalproject.UI.MyProfileController"
|
||||
prefWidth="400" prefHeight="600"
|
||||
styleClass="my-profile-root">
|
||||
<?import javafx.scene.image.Image?>
|
||||
<StackPane xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="org.to.telegramfinalproject.UI.MyProfileController"
|
||||
styleClass="overlay-root">
|
||||
|
||||
<VBox spacing="15" padding="20">
|
||||
<!-- Background (click to close) -->
|
||||
<Pane fx:id="overlayBackground" styleClass="overlay-background"/>
|
||||
|
||||
<!-- Top Bar -->
|
||||
<!-- Profile card -->
|
||||
<VBox fx:id="profileCard" styleClass="profile-card" spacing="16"
|
||||
prefWidth="360" maxWidth="360"
|
||||
prefHeight="480" maxHeight="480">
|
||||
|
||||
<!-- ===== Header: My Profile (left) + actions (right) ===== -->
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<ImageView fx:id="profileImage" fitHeight="80" fitWidth="80"
|
||||
styleClass="profile-image"/>
|
||||
<VBox>
|
||||
<Label fx:id="displayName" text="Display Name" styleClass="profile-name"/>
|
||||
<Label fx:id="status" text="online" styleClass="profile-status"/>
|
||||
<Label text="My Profile" styleClass="profile-title" HBox.hgrow="ALWAYS"/>
|
||||
<Pane HBox.hgrow="ALWAYS"/> <!-- pushes buttons to right -->
|
||||
|
||||
<Button fx:id="editButton" styleClass="icon-button"/>
|
||||
<Button fx:id="closeButton" styleClass="icon-button" text="✕"/>
|
||||
</HBox>
|
||||
|
||||
<!-- ===== Profile section: picture + name/status ===== -->
|
||||
<HBox alignment="CENTER_LEFT" spacing="12">
|
||||
<ImageView fx:id="profileImage" fitWidth="80" fitHeight="80" preserveRatio="true"
|
||||
styleClass="profile-picture"/>
|
||||
<VBox alignment="CENTER_LEFT" spacing="4">
|
||||
<Label fx:id="profileName" text="User Name" styleClass="profile-name"/>
|
||||
<Label fx:id="profileStatus" text="online" styleClass="profile-status"/>
|
||||
</VBox>
|
||||
</HBox>
|
||||
|
||||
<Separator/>
|
||||
<Separator styleClass="section-separator"/>
|
||||
|
||||
<!-- Bio -->
|
||||
<HBox spacing="10" alignment="CENTER_LEFT">
|
||||
<Label text="Bio:" styleClass="field-label"/>
|
||||
<Label fx:id="bio" text="This is the bio..." wrapText="true" styleClass="field-value"/>
|
||||
<!-- User info blocks (shifted to align under profile image) -->
|
||||
<HBox alignment="TOP_LEFT">
|
||||
<Pane prefWidth="30"/>
|
||||
|
||||
<VBox spacing="16">
|
||||
|
||||
<!-- Bio -->
|
||||
<VBox fx:id="bioBlock" spacing="2">
|
||||
<Label fx:id="userBio" wrapText="true" styleClass="profile-info-main"/>
|
||||
<Label text="Bio" styleClass="profile-info-sub"/>
|
||||
</VBox>
|
||||
|
||||
<!-- Username -->
|
||||
<VBox spacing="2">
|
||||
<Label fx:id="userId" styleClass="profile-info-main"/>
|
||||
<Label text="Username" styleClass="profile-info-sub"/>
|
||||
</VBox>
|
||||
|
||||
</VBox>
|
||||
</HBox>
|
||||
|
||||
<!-- User ID -->
|
||||
<HBox spacing="10" alignment="CENTER_LEFT">
|
||||
<Label text="User ID:" styleClass="field-label"/>
|
||||
<Label fx:id="userId" text="@user_id" styleClass="field-value"/>
|
||||
</HBox>
|
||||
|
||||
</VBox>
|
||||
</AnchorPane>
|
||||
</StackPane>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 549 B |
Binary file not shown.
|
After Width: | Height: | Size: 541 B |
Reference in New Issue
Block a user