This commit is contained in:
Reza
2026-05-26 14:00:50 +03:30
parent fa5f8ab267
commit 26e0b071d0
7 changed files with 212 additions and 17 deletions
+39 -3
View File
@@ -1,8 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns="http://javafx.com/fxml" alignment="CENTER" spacing="10">
<!-- TODO: Add your code here! -->
<VBox xmlns="http://javafx.com/fxml"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="sbu.javafx.MusicController"
alignment="CENTER" spacing="15">
<padding><Insets top="25" right="25" bottom="25" left="25"/></padding>
<HBox spacing="20" alignment="CENTER">
<Label text="🎵 Music Player" styleClass="header-title"/>
<Button text="Toggle Theme" onAction="#toggleTheme"/>
</HBox>
<Label fx:id="nowPlayingLabel" text="Now Playing: None" styleClass="now-playing"/>
<VBox styleClass="song-card" spacing="8">
<Label text="Blinding Lights" styleClass="song-title"/>
<Label text="The Weeknd · 3:20" styleClass="song-artist"/>
<HBox spacing="10">
<Button fx:id="playBtn1" text="Play" onAction="#handlePlayAction" styleClass="play-btn"/>
<Button text="+ Playlist" onAction="#handleAdd1" styleClass="add-btn"/>
</HBox>
</VBox>
<VBox styleClass="song-card" spacing="8">
<Label text="Bohemian Rhapsody" styleClass="song-title"/>
<Label text="Queen · 5:55" styleClass="song-artist"/>
<HBox spacing="10">
<Button fx:id="playBtn2" text="Play" onAction="#handlePlayAction" styleClass="play-btn"/>
<Button text="+ Playlist" onAction="#handleAdd2" styleClass="add-btn"/>
</HBox>
</VBox>
<VBox styleClass="song-card" spacing="8">
<Label text="Hotel California" styleClass="song-title"/>
<Label text="Eagles · 6:30" styleClass="song-artist"/>
<HBox spacing="10">
<Button fx:id="playBtn3" text="Play" onAction="#handlePlayAction" styleClass="play-btn"/>
<Button text="+ Playlist" onAction="#handleAdd3" styleClass="add-btn"/>
</HBox>
</VBox>
<Button text="View Playlist" onAction="#openPlaylistWindow" styleClass="view-playlist-btn"/>
</VBox>
+51
View File
@@ -0,0 +1,51 @@
.root {
-fx-background-color: #1a1a2e;
-fx-font-family: "Segoe UI", sans-serif;
}
.header-title {
-fx-font-size: 24px;
-fx-font-weight: bold;
-fx-text-fill: #ffffff;
}
.now-playing {
-fx-font-size: 14px;
-fx-text-fill: #aaaaaa;
}
.song-card {
-fx-background-color: #2d2d44;
-fx-padding: 15;
-fx-background-radius: 10;
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.3), 5, 0, 0, 2);
}
.song-title {
-fx-font-size: 16px;
-fx-font-weight: bold;
-fx-text-fill: #ffffff;
}
.song-artist {
-fx-text-fill: #888888;
}
.play-btn {
-fx-background-color: #2196F3;
-fx-text-fill: white;
}
.play-btn:disabled {
-fx-opacity: 0.6;
}
.add-btn {
-fx-background-color: #4a4a6a;
-fx-text-fill: white;
}
.view-playlist-btn {
-fx-background-color: #9C27B0;
-fx-text-fill: white;
}
+47
View File
@@ -0,0 +1,47 @@
.root {
-fx-background-color: #f5f5f5;
-fx-font-family: "Segoe UI", sans-serif;
}
.header-title {
-fx-font-size: 24px;
-fx-font-weight: bold;
-fx-text-fill: #1a1a2e;
}
.now-playing {
-fx-font-size: 14px;
-fx-text-fill: #555555;
}
.song-card {
-fx-background-color: #ffffff;
-fx-padding: 15;
-fx-background-radius: 10;
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 5, 0, 0, 2);
}
.song-title {
-fx-font-size: 16px;
-fx-font-weight: bold;
-fx-text-fill: #000000;
}
.song-artist {
-fx-text-fill: #888888;
}
.play-btn {
-fx-background-color: #2196F3;
-fx-text-fill: white;
}
.add-btn {
-fx-background-color: #e0e0e0;
-fx-text-fill: #1a1a2e;
}
.view-playlist-btn {
-fx-background-color: #9C27B0;
-fx-text-fill: white;
}