Mods
This commit is contained in:
@@ -21,7 +21,7 @@ class Config:
|
|||||||
background_color: str = "rgb(44, 44, 44)"
|
background_color: str = "rgb(44, 44, 44)"
|
||||||
text_color: str = "#ffffff"
|
text_color: str = "#ffffff"
|
||||||
image_size: int = 80
|
image_size: int = 80
|
||||||
space_1: int = 20
|
space_1: int = 18
|
||||||
max_updates: int = 250
|
max_updates: int = 250
|
||||||
loop_delay_fast: int = 1000 * 5
|
loop_delay_fast: int = 1000 * 5
|
||||||
loop_delay_normal: int = 1000 * 60 * 1
|
loop_delay_normal: int = 1000 * 60 * 1
|
||||||
|
@@ -18,11 +18,9 @@ from PySide6.QtWidgets import QSizePolicy
|
|||||||
from PySide6.QtWidgets import QMessageBox
|
from PySide6.QtWidgets import QMessageBox
|
||||||
from PySide6.QtWidgets import QLineEdit
|
from PySide6.QtWidgets import QLineEdit
|
||||||
from PySide6.QtGui import QFontDatabase # type: ignore
|
from PySide6.QtGui import QFontDatabase # type: ignore
|
||||||
from PySide6.QtGui import QMouseEvent
|
|
||||||
from PySide6.QtGui import QIcon
|
from PySide6.QtGui import QIcon
|
||||||
from PySide6.QtGui import QKeyEvent
|
from PySide6.QtGui import QKeyEvent
|
||||||
from PySide6.QtCore import Qt # type: ignore
|
from PySide6.QtCore import Qt # type: ignore
|
||||||
from PySide6.QtCore import Signal
|
|
||||||
from PySide6.QtCore import QUrl
|
from PySide6.QtCore import QUrl
|
||||||
from PySide6.QtMultimedia import QMediaPlayer # type: ignore
|
from PySide6.QtMultimedia import QMediaPlayer # type: ignore
|
||||||
from PySide6.QtMultimedia import QAudioOutput
|
from PySide6.QtMultimedia import QAudioOutput
|
||||||
@@ -31,16 +29,6 @@ from .config import Config
|
|||||||
from .utils import Utils
|
from .utils import Utils
|
||||||
|
|
||||||
|
|
||||||
class SpecialButton(QPushButton): # type: ignore
|
|
||||||
middleClicked = Signal()
|
|
||||||
|
|
||||||
def mousePressEvent(self, e: QMouseEvent) -> None:
|
|
||||||
if e.button() == Qt.MiddleButton:
|
|
||||||
self.middleClicked.emit()
|
|
||||||
else:
|
|
||||||
super().mousePressEvent(e)
|
|
||||||
|
|
||||||
|
|
||||||
class FilterLineEdit(QLineEdit): # type: ignore
|
class FilterLineEdit(QLineEdit): # type: ignore
|
||||||
def keyPressEvent(self, e: QKeyEvent) -> None:
|
def keyPressEvent(self, e: QKeyEvent) -> None:
|
||||||
if e.key() == Qt.Key_Escape:
|
if e.key() == Qt.Key_Escape:
|
||||||
@@ -57,7 +45,7 @@ class Window:
|
|||||||
view_scene: QGraphicsScene
|
view_scene: QGraphicsScene
|
||||||
speed: QComboBox
|
speed: QComboBox
|
||||||
scroll_area: QScrollArea
|
scroll_area: QScrollArea
|
||||||
info: SpecialButton
|
info: QPushButton
|
||||||
font: str
|
font: str
|
||||||
emoji_font: str
|
emoji_font: str
|
||||||
player: QMediaPlayer
|
player: QMediaPlayer
|
||||||
@@ -304,7 +292,7 @@ class Window:
|
|||||||
root = QWidget()
|
root = QWidget()
|
||||||
root.setContentsMargins(0, 0, 0, 0)
|
root.setContentsMargins(0, 0, 0, 0)
|
||||||
container = QHBoxLayout()
|
container = QHBoxLayout()
|
||||||
Window.info = SpecialButton("---")
|
Window.info = QPushButton("---")
|
||||||
Window.info.setToolTip("Click to scroll to the bottom or top")
|
Window.info.setToolTip("Click to scroll to the bottom or top")
|
||||||
Window.info.clicked.connect(Window.toggle_scroll)
|
Window.info.clicked.connect(Window.toggle_scroll)
|
||||||
Window.info.setMinimumSize(35, 35)
|
Window.info.setMinimumSize(35, 35)
|
||||||
|
Reference in New Issue
Block a user