From 99934e73b76e68ffcce82692900c4a60bbb66fe6 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Mon, 23 Dec 2024 16:02:22 +0100 Subject: [PATCH] Made some gui improvements. --- wobuzz/ui/library.py | 6 +++--- wobuzz/ui/main_container.py | 8 ++++---- wobuzz/ui/track_control.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wobuzz/ui/library.py b/wobuzz/ui/library.py index c1eb17d..693903f 100644 --- a/wobuzz/ui/library.py +++ b/wobuzz/ui/library.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -from PyQt6.QtWidgets import QToolBox, QLabel, QFrame +from PyQt6.QtWidgets import QToolBox, QLabel, QFrame, QTabWidget class Library(QToolBox): @@ -10,8 +10,8 @@ class Library(QToolBox): self.setFrameShape(QFrame.Shape.Box) self.setFrameShadow(QFrame.Shadow.Sunken) - label = QLabel() - self.addItem(label, "Playlists") + playlist_tabs = QTabWidget() + self.addItem(playlist_tabs, "Playlists") label = QLabel() self.addItem(label, "Genres") label = QLabel() diff --git a/wobuzz/ui/main_container.py b/wobuzz/ui/main_container.py index c0df367..72b51b2 100644 --- a/wobuzz/ui/main_container.py +++ b/wobuzz/ui/main_container.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -from PyQt6.QtWidgets import QWidget, QFrame, QDockWidget, QGridLayout +from PyQt6.QtWidgets import QWidget, QGridLayout, QSizePolicy from .track_control import TrackControl from .lines import HLine @@ -12,10 +12,10 @@ class MainContainer(QWidget): self.layout = QGridLayout() self.setLayout(self.layout) - self.layout.addWidget(HLine(self)) - self.track_control = TrackControl(self) self.layout.addWidget(self.track_control) - self.layout.addWidget(HLine(self)) + self.layout.addWidget(HLine(self)) # track_control separator line + + self.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed) diff --git a/wobuzz/ui/track_control.py b/wobuzz/ui/track_control.py index ccbded4..ca885ae 100644 --- a/wobuzz/ui/track_control.py +++ b/wobuzz/ui/track_control.py @@ -2,7 +2,7 @@ from PyQt6.QtCore import Qt from PyQt6.QtGui import QIcon -from PyQt6.QtWidgets import QToolBar, QLabel, QSlider +from PyQt6.QtWidgets import QToolBar, QLabel from .track_progress_slider import TrackProgressSlider