Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions export_debug.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ REM Avoid footgun by explictly navigating to the directory containing the batch
cd /d "%~dp0"

REM Verify that OneTrainer is our current working directory
if not exist "scripts\train_ui.py" (
echo Error: train_ui.py does not exist, you have done something very wrong. Reclone the repository.
if not exist "scripts\train_ui_qt.py" (
echo Error: train_ui_qt.py does not exist, you have done something very wrong. Reclone the repository.
goto :end
)

Expand Down
6 changes: 5 additions & 1 deletion modules/util/ui/pyside6_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from PySide6.QtCore import Qt
from PySide6.QtGui import QColor, QPalette
from PySide6.QtWidgets import QApplication, QWidget
from PySide6.QtWidgets import QApplication, QStyleFactory, QWidget


class QtABCMeta(type(QWidget), ABCMeta):
Expand All @@ -20,6 +20,10 @@ def create_application() -> QApplication:
signal.signal(signal.SIGINT, signal.SIG_DFL)

app = QApplication(sys.argv)
# Force Fusion everywhere: native styles (e.g. windowsvista) draw standard
# controls via OS theme APIs, which breaks once an application stylesheet
# is set, producing a flatter look than Fusion's own stylesheet-aware painting.
app.setStyle(QStyleFactory.create("Fusion"))
app.styleHints().setColorScheme(Qt.ColorScheme.Light)

palette = app.palette()
Expand Down
4 changes: 2 additions & 2 deletions update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ REM Avoid footgun by explictly navigating to the directory containing the batch
cd /d "%~dp0"

REM Verify that OneTrainer is our current working directory
if not exist "scripts\train_ui.py" (
echo Error: train_ui.py does not exist, you have done something very wrong. Reclone the repository.
if not exist "scripts\train_ui_qt.py" (
echo Error: train_ui_qt.py does not exist, you have done something very wrong. Reclone the repository.
goto :end
)

Expand Down