UN-GCPDS / qt-material

Material inspired stylesheet for PySide2, PySide6, PyQt5 and PyQt6
https://qt-material.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
2.27k stars 241 forks source link

Background color broken in linux #26

Closed airabinovich closed 3 years ago

airabinovich commented 3 years ago

Hello, I'm developing an application with PyQt5 and qt-material. When I try the application in macOS it looked good but in ubuntu linux the background looks odd. I'm using a dark theme and the background looks almost white so the text (labels, buttons, etc) is almost impossible to read Versions that I'm using

qt-material==2.8.7
PyQt5==5.15.4

This is the way in what I'm using the library

class MainWindow(QWidget, QtStyleTools):

    def __init__(self):
        super().__init__()
        self.main = PyQt5.uic.loadUi('gui/screens/main_window.ui', self)
        self.apply_stylesheet(self.main, theme='dark_blue.xml')

I tried setting env var QTMATERIAL_SECONDARYDARKCOLOR=#000000 and using extra attribute and nothing changed

Could you help me? Thanks

YeisonCardona commented 3 years ago

Hi @airabinovich

The environment variables are not supposed to use for configuring the theme. Even if is possible to change the theme variables with the extra argument and with the correct key (for example secondaryDarkColor) this is no the recommend way to do it.

Please refer to custom colors instructions.