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_33,
MiG_21Bis,
MiG_19P,
MiG_29A,
MiG_29S,
FA_18C_hornet,
@ -198,7 +199,6 @@ UNIT_BY_TASK = {
CAS: [
F_86F_Sabre,
MiG_15bis,
MiG_19P,
L_39ZA,
AV8BNA,
AJS37,

View File

@ -42,11 +42,13 @@ if __name__ == "__main__":
app.processEvents()
# Uncomment to apply CSS (need works)
#app.setStyleSheet(css)
GameUpdateSignal()
# Start window
window = QLiberationWindow()
window.setStyleSheet(css)
window.show()
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,
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.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.fill(QColor(40, 40, 150))
overlay = scene.addPixmap(ov)
effect = QGraphicsOpacityEffect();
effect = QGraphicsOpacityEffect()
effect.setOpacity(0.7)
overlay.setGraphicsEffect(effect)
else:
ov = QPixmap(bg.width(), bg.height())
ov.fill(QColor(165, 100, 100))
overlay = scene.addPixmap(ov)
effect = QGraphicsOpacityEffect();
effect = QGraphicsOpacityEffect()
effect.setOpacity(0.3)
overlay.setGraphicsEffect(effect)

View File

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