From 49c1ac6846a9dc208b37bbe31c0db39dd0840e87 Mon Sep 17 00:00:00 2001 From: Sergey Palcheh Date: Tue, 21 Oct 2025 14:36:47 +0600 Subject: [PATCH] fixed the text color change after an error in the log --- winehelper_gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winehelper_gui.py b/winehelper_gui.py index 337e7ef..12bf8d4 100644 --- a/winehelper_gui.py +++ b/winehelper_gui.py @@ -14,7 +14,7 @@ from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QH QTextEdit, QFileDialog, QMessageBox, QLineEdit, QCheckBox, QStackedWidget, QScrollArea, QFormLayout, QGroupBox, QRadioButton, QComboBox, QListWidget, QListWidgetItem, QGridLayout, QFrame, QDialog, QTextBrowser, QInputDialog, QDialogButtonBox, QSystemTrayIcon, QMenu) from PyQt5.QtCore import Qt, QProcess, QSize, QTimer, QProcessEnvironment, QPropertyAnimation, QEasingCurve, pyqtSignal -from PyQt5.QtGui import QIcon, QFont, QTextCursor, QPixmap, QPainter, QCursor +from PyQt5.QtGui import QIcon, QFont, QTextCursor, QPixmap, QPainter, QCursor, QTextCharFormat from PyQt5.QtNetwork import QLocalServer, QLocalSocket @@ -870,6 +870,9 @@ class WinetricksManagerDialog(QDialog): "Подробности смотрите в логе.", QMessageBox.Warning, {"buttons": {"OK": QMessageBox.AcceptRole}}) + # Сбрасываем формат символов к значению по умолчанию. + # Это гарантирует, что следующий вызов append() не унаследует красный цвет. + self.log_output.setCurrentCharFormat(QTextCharFormat()) self.apply_button.setEnabled(True) self.close_button.setEnabled(True) return