Apply CSS to whole app, but disabled for now

This commit is contained in:
Khopa 2019-07-13 00:53:11 +02:00
parent 70331d913d
commit 73b4ec47b9
4 changed files with 30 additions and 12 deletions

View File

@ -184,6 +184,7 @@ UNIT_BY_TASK = {
Su_27, Su_27,
Su_33, Su_33,
MiG_21Bis, MiG_21Bis,
MiG_19P,
MiG_29A, MiG_29A,
MiG_29S, MiG_29S,
FA_18C_hornet, FA_18C_hornet,
@ -198,7 +199,6 @@ UNIT_BY_TASK = {
CAS: [ CAS: [
F_86F_Sabre, F_86F_Sabre,
MiG_15bis, MiG_15bis,
MiG_19P,
L_39ZA, L_39ZA,
AV8BNA, AV8BNA,
AJS37, AJS37,

View File

@ -42,11 +42,13 @@ if __name__ == "__main__":
app.processEvents() app.processEvents()
# Uncomment to apply CSS (need works)
#app.setStyleSheet(css)
GameUpdateSignal() GameUpdateSignal()
# Start window # Start window
window = QLiberationWindow() window = QLiberationWindow()
window.setStyleSheet(css)
window.show() window.show()
splash.finish(window) splash.finish(window)

View File

@ -78,8 +78,6 @@ class QLiberationMap(QGraphicsView):
scene.addItem(QMapControlPoint(self, pos[0] - CONST.CP_SIZE / 2, pos[1] - CONST.CP_SIZE / 2, CONST.CP_SIZE, scene.addItem(QMapControlPoint(self, pos[0] - CONST.CP_SIZE / 2, pos[1] - CONST.CP_SIZE / 2, CONST.CP_SIZE,
CONST.CP_SIZE, cp, self.game)) CONST.CP_SIZE, cp, self.game))
# e = scene.addEllipse(pos[0]-CONST.CP_SIZE/2, pos[1]-CONST.CP_SIZE/2, CONST.CP_SIZE, CONST.CP_SIZE, QPen(brush=QBrush(color=color), width=5), brush=color)
text = scene.addText(cp.name, font=QFont("Trebuchet MS", 10, weight=5, italic=False)) text = scene.addText(cp.name, font=QFont("Trebuchet MS", 10, weight=5, italic=False))
text.setPos(pos[0] + CONST.CP_SIZE, pos[1] - CONST.CP_SIZE / 2) text.setPos(pos[0] + CONST.CP_SIZE, pos[1] - CONST.CP_SIZE / 2)
@ -254,14 +252,14 @@ class QLiberationMap(QGraphicsView):
ov = QPixmap(bg.width(), bg.height()) ov = QPixmap(bg.width(), bg.height())
ov.fill(QColor(40, 40, 150)) ov.fill(QColor(40, 40, 150))
overlay = scene.addPixmap(ov) overlay = scene.addPixmap(ov)
effect = QGraphicsOpacityEffect(); effect = QGraphicsOpacityEffect()
effect.setOpacity(0.7) effect.setOpacity(0.7)
overlay.setGraphicsEffect(effect) overlay.setGraphicsEffect(effect)
else: else:
ov = QPixmap(bg.width(), bg.height()) ov = QPixmap(bg.width(), bg.height())
ov.fill(QColor(165, 100, 100)) ov.fill(QColor(165, 100, 100))
overlay = scene.addPixmap(ov) overlay = scene.addPixmap(ov)
effect = QGraphicsOpacityEffect(); effect = QGraphicsOpacityEffect()
effect.setOpacity(0.3) effect.setOpacity(0.3)
overlay.setGraphicsEffect(effect) overlay.setGraphicsEffect(effect)

View File

@ -1,21 +1,39 @@
QWidget {
background-color: #4E5760;
color:white;
}
QComboxBox {
background-color: #fff;
color:white;
}
QLiberationWindow{ QLiberationWindow{
background-color: #4E5760;
color:white;
} }
QTopPanel, QTopPanel,
QTopPanel *{ QTopPanel *{
/*background-color: #4E5760;*/ background-color: #aaa;
/*color: white;*/ color: white;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
} }
QPushButton[style="btn-primary"]{ QPushButton[style="btn-primary"]{
/*background-color:#699245;*/ background-color:#699245;
/*color:white;*/ cursor:pointer;
/*padding: 21px 5px 21px 5px; padding: 5px 5px 5px 5px;
margin-top: 6px;*/ border-radius:2px;
}
QPushButton[style="btn-primary"]:hover{
background-color:#f00;
padding: 5px 5px 5px 5px;
border-radius:2px;
} }
QBaseMenu{ QBaseMenu{