load courtroom_stylesheets.css

This commit is contained in:
cidoku 2025-10-10 22:57:04 -03:00
parent 33d23f56cd
commit 1d41392112
2 changed files with 8 additions and 4 deletions

View File

@ -20,7 +20,6 @@ class AOToggleButton(QtGui.QLabel):
self.show()
def setPixmaps(self, theme):
print self.name
self.pressed_pix = QtGui.QPixmap(testPath(
AO2XPpath + "ao2xp_themes/%s/%s_pressed.png" % (theme, self.name),
AO2XPpath + "themes/default/%s_pressed.png" % self.name,

View File

@ -1710,8 +1710,7 @@ class GUI(QtGui.QWidget):
def loadTheme(self, switching=False):
theme = getOption("General", "theme", "default")
try:
self.style = ""
self.gamewindow.setStyleSheet(self.style)
self.gamewindow.setStyleSheet("")
self.chatbox.resetGeometry()
self.btnRealization.setPixmaps(theme)
@ -1764,8 +1763,14 @@ class GUI(QtGui.QWidget):
courtroomBackground = QtGui.QPixmap(courtroomBackground)
self.width = courtroomBackground.size().width()
self.height = courtroomBackground.size().height()
# Stylesheet
courtroomStylesheets = AO2XPpath + "ao2xp_themes/" + theme + '/courtroom_stylesheets.css'
if exists(courtroomStylesheets):
with open(courtroomStylesheets) as f:
self.style += f.read()
self.gamewindow.setStyleSheet(self.style)
self.style = ""
self.presentedEvidence.setGeometry(self.viewport.x() + 16, self.viewport.y() + 16, 70 * self.viewportScale, 70 * self.viewportScale)