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:
parent
0c2c91389d
commit
3ac97755bf
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue