Set the cursor when hovering over a Playlist title to a normal cursor and made the Player start with the last playlist as active tab.

This commit is contained in:
The Wobbler 2025-02-12 14:04:11 +01:00
parent 0c2c91389d
commit 3ac97755bf
2 changed files with 6 additions and 2 deletions

View file

@ -56,6 +56,9 @@ class Library:
playlist_view = PlaylistView(playlist, library_dock)
playlist_tabs.addTab(playlist_view, playlist.title)
if playlist.path == self.app.settings.latest_playlist: # start with latest playlist opened
playlist_tabs.setCurrentIndex(playlist_tabs.count() - 1)
def on_exit(self, event):
for playlist in self.playlists:
if playlist.loaded: # only save loaded playlists, unloaded are empty

View file

@ -1,7 +1,7 @@
#!/usr/bin/python3
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QMouseEvent
from PyQt6.QtGui import QMouseEvent, QCursor
from PyQt6.QtWidgets import QLineEdit
from .tab_bar import PlaylistTabBar
@ -17,9 +17,10 @@ class TabTitle(QLineEdit):
self.playlist_view = playlist_view
self.setStyleSheet("QLineEdit {background: transparent;}")
self.setFocusPolicy(Qt.FocusPolicy.TabFocus)
self.setCursor(QCursor(Qt.CursorShape.ArrowCursor)) # normal cursor (would be a text cursor)
self.editingFinished.connect(self.on_edit)
def mouseDoubleClickEvent(self, event: QMouseEvent):