This commit is contained in:
2025-06-02 14:53:57 +03:00
parent 91231b6a53
commit d7dc3e4ec4
29 changed files with 1252 additions and 3571 deletions

42
src/utils/window_utils.py Normal file
View File

@ -0,0 +1,42 @@
# src/utils/window_utils.py
from PyQt5.QtWidgets import QDialog, QMessageBox, QInputDialog
from PyQt5.QtCore import Qt
def show_floating_dialog(parent, title, message, icon=QMessageBox.Information):
"""Показывает диалоговое окно как плавающее поверх всех окон"""
dialog = QMessageBox(parent)
dialog.setWindowTitle(title)
dialog.setText(message)
dialog.setIcon(icon)
# Устанавливаем флаги для плавающего окна
dialog.setWindowFlags(
Qt.Window |
Qt.CustomizeWindowHint |
Qt.WindowTitleHint |
Qt.WindowStaysOnTopHint
)
# Отключаем тайлинг для этого окна
dialog.setProperty("hyprland_floating", True)
return dialog.exec_()
def create_floating_input(parent, title, label):
"""Создает плавающее окно ввода"""
dialog = QInputDialog(parent)
dialog.setWindowTitle(title)
dialog.setLabelText(label)
# Устанавливаем флаги для плавающего окна
dialog.setWindowFlags(
Qt.Window |
Qt.CustomizeWindowHint |
Qt.WindowTitleHint |
Qt.WindowStaysOnTopHint
)
# Отключаем тайлинг для этого окна
dialog.setProperty("hyprland_floating", True)
return dialog