class MonoFont:
    def __init__(self, name, size):
        self.font = QFont(name, size)
        self.font.setKerning(False)
        self.ascent = int(QFontMetricsF(self.font).ascent())
        self.charWidth = QFontMetricsF(self.font).width("X")
        self.charHeight = int(QFontMetricsF(self.font).height())
        self.charOffset = 0  # can introduce extra linespacing here

        self.bold = QFont(self.font)
        self.bold.setBold(True)

        self.under = QFont(self.font)
        self.under.setUnderline(True)

        # align character width properly
        if self.charWidth % 1.0 < 0.5:
            adjust = -(self.charWidth % 1.0)
        else:
            adjust = 1.0 - (self.charWidth % 1.0)

        self.charWidth += adjust
        self.font.setLetterSpacing(QFont.AbsoluteSpacing, adjust)
        self.bold.setLetterSpacing(QFont.AbsoluteSpacing, adjust)
        self.under.setLetterSpacing(QFont.AbsoluteSpacing, adjust)
Beispiel #2
0
    def __init__(self):
        QMainWindow.__init__(self)
        Ui_MainWindow.setupUi(self, self)

        self.editFile = File(self, None)
        self.editFile.updated.connect(self.editFileUpdated)

        # monospace font
        font = QFont('')
        font.setStyleHint(QFont.TypeWriter)
        font.setKerning(True)

        self.inputBox.setFont(font)
        self.resultDock.setTitleBarWidget(QWidget())

        self.translator = Translator()
    def setupUi(self, TDWin):

        #window settings
        TDWin.setObjectName("TDWin")
        TDWin.setEnabled(True)
        TDWin.resize(380, 340)
        TDWin.setMinimumSize(QSize(380, 340))
        TDWin.setMaximumSize(QSize(380, 340))
        TDWin.setAutoFillBackground(False)

        #central widget
        self.centralwidget = QWidget(TDWin)
        self.centralwidget.setEnabled(True)
        self.centralwidget.setObjectName("centralwidget")

        #label for channel name/url
        self.channelUrlLabel = QLabel(self.centralwidget)
        self.channelUrlLabel.setGeometry(QRect(10, 10, 121, 41))
        font = QFont()
        font.setFamily("Yu Gothic Light")
        font.setPointSize(10)
        font.setBold(False)
        font.setWeight(50)
        self.channelUrlLabel.setFont(font)
        self.channelUrlLabel.setObjectName("channelUrlLabel")

        #box where text gets put in for name/url
        self.channelUrlLineEdit = QLineEdit(self.centralwidget)
        self.channelUrlLineEdit.setGeometry(QRect(132, 20, 110, 21))
        self.channelUrlLineEdit.setObjectName("channelUrlLineEdit")

        #button to retrive thumbnail
        self.retrievePushButton = QPushButton(self.centralwidget)
        self.retrievePushButton.setGeometry(QRect(250, 20, 121, 21))
        self.retrievePushButton.setObjectName("retrievePushButton")

        #label that says preview
        self.previewLabel = QLabel(self.centralwidget)
        self.previewLabel.setGeometry(QRect(10, 50, 131, 41))
        font = QFont()
        font.setFamily("Yu Gothic Light")
        font.setPointSize(10)
        font.setKerning(True)
        self.previewLabel.setFont(font)
        self.previewLabel.setObjectName("previewLabel")

        #label that stores image for thumbnail
        self.previewImageLabel = QLabel(self.centralwidget)
        self.previewImageLabel.setGeometry(QRect(10, 83, 361, 203))
        self.previewImageLabel.setAutoFillBackground(True)
        self.previewImageLabel.setFrameShape(QFrame.Box)
        self.previewImageLabel.setText("")
        self.previewImageLabel.setObjectName("previewImageLabel")

        #button to copy
        self.copyPushButton = QPushButton(self.centralwidget)
        self.copyPushButton.setGeometry(QRect(10, 297, 180, 21))
        self.copyPushButton.setObjectName("copyPushButton")

        #button to save
        self.savePushButton = QPushButton(self.centralwidget)
        self.savePushButton.setGeometry(QRect(196, 297, 119, 21))
        self.savePushButton.setObjectName("savePushButton")

        TDWin.setCentralWidget(self.centralwidget)

        #statusbar for window
        self.statusbar = QStatusBar(TDWin)
        self.statusbar.setObjectName("statusbar")
        TDWin.setStatusBar(self.statusbar)

        #set up names in ui
        self.retranslateUi(TDWin)

        QMetaObject.connectSlotsByName(TDWin)

        #connecting the button presses to functions
        self.retrievePushButton.clicked.connect(
            lambda: self.retrievePushButtonClicked())
        self.copyPushButton.clicked.connect(
            lambda: self.copyPushButtonClicked())
        self.savePushButton.clicked.connect(
            lambda: self.savePushButtonClicked())

        self.statusbar.showMessage(
            "Thumbnail Downloader 1.0 by Jackson Greene", 3000)
Beispiel #4
0
    def setupUi(self, main_window):
        main_window.resize(1280, 720)
        main_window.setMinimumSize(QSize(1280, 720))
        main_window.setMaximumSize(QSize(1280, 720))
        font = QFont()
        font.setFamily("Times New Roman")
        font.setKerning(True)
        font.setPointSize(15)
        font.setWeight(50)
        main_window.setFont(font)

        frame_geometry = main_window.frameGeometry()
        screen = QApplication.desktop().screenNumber(
            QApplication.desktop().cursor().pos())
        center_point = QApplication.desktop().screenGeometry(screen).center()
        frame_geometry.moveCenter(center_point)
        main_window.move(frame_geometry.topLeft())

        code = self.auth.check_license()

        if code != 1:
            dialog = AuthQInputDialog(license_error_code[code])
            dialog.exec_()
            print(dialog.textValue())
            if self.auth.password_verification(dialog.textValue()):
                self.auth.generate_license()
            else:
                exit(1)
        else:
            self.auth.load_data_from_license()

        self.main_window = main_window
        self.centralwidget = QWidget(main_window)

        main_window.statusBar().hide()

        exitAct = QAction('&Exit', main_window)
        exitAct.setShortcut('Ctrl+Q')
        exitAct.setStatusTip('Exit application')
        exitAct.triggered.connect(qApp.quit)

        tool_bar = main_window.addToolBar('Выход')
        tool_bar.setMovable(False)
        tool_bar.addAction('Администрирование').triggered.connect(
            self.admin_app)
        tool_bar.addAction('Выход').triggered.connect(self.exit_app)

        self.listWidget = QListWidget(self.centralwidget)
        self.listWidget.setGeometry(QRect(0, 0, 391, 711))
        self.listWidget.setMinimumSize(QSize(0, 0))
        self.listWidget.setMaximumSize(QSize(16777215, 16777215))
        self.listWidget.setFont(font)
        self.listWidget.setStyleSheet(
            "QListWidget { border-style: outset; border-width: 1px }\n"
            "QListWidget::item { border-bottom: 2px solid black }\n"
            "QListWidget::item:selected { background-color: rgb(77, 148, 255) }\n"
            "QListWidget::item:hover { background-color: rgb(153, 194, 255) }")
        self.listWidget.setLineWidth(5)
        self.listWidget.setWordWrap(True)

        for i in range(len(THEMES)):
            self.listWidget.addItem(QListWidgetItem())

        self.scrollArea = QScrollArea(self.centralwidget)
        self.scrollArea.setGeometry(QRect(389, -1, 891, 711))
        self.scrollArea.setStyleSheet(
            "border-style: outset; border-width: 1px")
        self.scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scrollArea.setWidgetResizable(True)

        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 875, 709))

        self.label = QLabel(self.scrollAreaWidgetContents)
        self.label.setGeometry(QRect(0, 0, 891, 711))
        self.label.setText("")
        self.label.setAlignment(Qt.AlignHCenter | Qt.AlignTop)
        self.label.setWordWrap(False)

        self.scrollArea.setWidget(self.label)
        main_window.setCentralWidget(self.centralwidget)

        self.ui_add_content(main_window)
        self.tester_ui(main_window)

        QMetaObject.connectSlotsByName(main_window)
Beispiel #5
0
from PyQt5.QtGui import QFont, QColor, QIcon

# string formting to concurrents lists
C_concurrents_item_fmt = "%4.0d %-12.10s %-15.10s"
# string formting to concurrents in monitor
C_concurrents_moni_fmt = "%-12.10s %-15.10s"
C_concurrents_ID_fmt = "ID_%16.16X"
C_concurrents_TP_fmt = "TP_%8.8X"
# font used in list
C_listFont = QFont()
C_listFont.setFamily("Courier New")
C_listFont.setPointSize(8)
C_listFont.setBold(False)
C_listFont.setItalic(False)
C_listFont.setWeight(50)
C_listFont.setKerning(False)
#
receiver = {}
decoder = {}
#
dictBestLapMonitor = dict()
dictBestLap = dict()
dictRace = dict()
# Definition for text formating in shell ( bash )
clear_screen = chr(27) + "c"
text_black = chr(27) + "[30m"
text_red = chr(27) + "[31m"
text_green = chr(27) + "[32m"
text_blue = chr(27) + "[34m"
text_normal = chr(27) + "[27m"
text_inverted = chr(27) + "[7m"
Beispiel #6
0
    def __init__(self, parent, path=""):
        #super().__init__()
        super(TextEdit, self).__init__(parent)

        self.parent = parent
        self.path = path

        font = QFont("Monospace", 8)  #QFont()
        #font.setFamily("Monospace")
        font.setStyleHint(QFont.Monospace)
        font.setStyle(QFont.StyleNormal)
        font.setStyleStrategy(QFont.PreferDefault)
        font.setWeight(QFont.ExtraLight)
        font.setCapitalization(QFont.MixedCase)
        font.setHintingPreference(QFont.PreferDefaultHinting)
        font.setLetterSpacing(QFont.PercentageSpacing, 100.0)
        font.setStretch(QFont.AnyStretch)

        font.setBold(False)
        font.setFixedPitch(True)
        font.setItalic(False)
        font.setKerning(True)
        font.setOverline(False)  # sobrelinea
        #font.setPixelSize(8) #font.setPointSize(8) font.setPointSizeF(8)
        font.setStrikeOut(False)  # tachado
        #font.setStyleName()
        font.setUnderline(False)
        #font.setWordSpacing(1)
        print(font.toString())

        charFormat = QTextCharFormat()
        charFormat.setFont(font)

        #self.setTabStopWidth(4)
        self.setCursorWidth(5)
        self.setCurrentCharFormat(charFormat)
        #print(self.document().defaultTextOption())

        #FIXME: Usaremos qss
        pal = QPalette()
        bgc = QColor(39, 40, 34)
        pal.setColor(QPalette.Base, bgc)
        textc = QColor(255, 255, 255)
        pal.setColor(QPalette.Text, textc)
        self.setPalette(pal)

        self.setLineWrapMode(QPlainTextEdit.NoWrap)

        #self.setTextBackgroundColor(QColor(0, 255, 255))
        #self.setTextColor(QColor(0, 255, 255))
        #self.setFontWeight(QFont.Normal)

        #cursor = self.textCursor()
        #cursor.movePosition(QTextCursor.End)
        #self.setDocumentTitle("Coso")

        #self.syntaxHighlighter = PythonHighlighter(self.document())

        # Señales
        #self.blockCountChanged.connect(self.__newBlock)
        #self.cursorPositionChanged.connect()
        #self.selectionChanged.connect(self.__changedSelection)
        #self.textChanged.connect(self.__changedText)
        #self.updateRequest.connect((const QRect &rect, int dy)
        #self.modificationChanged.connect(self.__chanedModification)

        #self.copyAvailable.connect(self.__copyAvailable)
        #self.undoAvailable.connect(self.__undoAvailable)
        #self.redoAvailable.connect(self.__redoAvailable)

        if os.path.exists(self.path):
            file = open(self.path, 'r')
            data = file.read()
            texto = self.__limpiar_codigo(data)
            self.setPlainText(texto)
            self.document().setModified(data != texto)
            if data != texto:
                print("El texto fue corregido al abrir el archivo.")
        else:
            self.setPlainText(
                "#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n")
            self.document().setModified(True)

        self.setFocus()
Beispiel #7
0
    def _setup_central_content(self) -> None:
        # Create the main content container
        self.main_content = QFrame(self.central_widget)
        self.main_content.setFrameShadow(QFrame.Raised)
        self.main_content.setFrameShape(QFrame.StyledPanel)
        self.main_content.setObjectName("main_content")

        size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        size_policy.setHorizontalStretch(42)
        size_policy.setHeightForWidth(
            self.main_content.sizePolicy().hasHeightForWidth())
        size_policy.setVerticalStretch(0)

        self.main_content.setSizePolicy(size_policy)
        self.main_content.setStyleSheet('')

        # Create the main content layout
        self.main_content_layout = QHBoxLayout(self.main_content)
        self.main_content_layout.setContentsMargins(0, 0, 0, 0)
        self.main_content_layout.setObjectName("main_content_layout")
        self.main_content_layout.setSpacing(0)

        # Create the content_bar
        self.content_bar = QFrame(self.main_content)
        self.content_bar.setFrameShadow(QFrame.Raised)
        self.content_bar.setFrameShape(QFrame.StyledPanel)
        self.content_bar.setObjectName("content_bar")

        size_policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        size_policy.setHorizontalStretch(1)
        size_policy.setHeightForWidth(
            self.content_bar.sizePolicy().hasHeightForWidth())
        size_policy.setVerticalStretch(0)

        self.content_bar.setSizePolicy(size_policy)

        # Create the content_bar layout
        self.content_bar_layout = QVBoxLayout(self.content_bar)
        self.content_bar_layout.setObjectName("content_bar_layout")

        # Create the open single file btn
        # self.open_file_btn = QToolButton(self.content_bar)
        # self.open_file_btn.setAutoRaise(False)
        # self.open_file_btn.setEnabled(False)

        # font = QFont()
        # font.setFamilies("Segoe UI")
        # font.setPointSize(10)

        # self.open_file_btn.setFont(font)

        # icon = QIcon()
        # icon.addPixmap(
        #     QPixmap(":/images/images/open_file_icon_sml.png"),
        #     QIcon.Normal,
        #     QIcon.Off
        # )

        # self.open_file_btn.setIcon(icon)
        # self.open_file_btn.setIconSize(QSize(60, 60))
        # # self.open_file_btn.setObjectName("open_file_btn")
        # self.open_file_btn.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)

        # Create the open dataset btn
        # self.open_dataset_btn = QToolButton(self.content_bar)
        # self.open_dataset_btn.setAutoRaise(False)
        # self.open_dataset_btn.setEnabled(False)

        # font = QFont()
        # font.setFamilies("Segoe UI")
        # font.setPointSize(10)

        # self.open_dataset_btn.setFont(font)

        # icon = QIcon()
        # icon.addPixmap(
        #     QPixmap(":/images/images/open_directory_icon_sml.png"),
        #     QIcon.Normal,
        #     QIcon.Off
        # )

        # self.open_dataset_btn.setIcon(icon)
        # self.open_dataset_btn.setIconSize(QSize(60, 60))
        # # self.open_dataset_btn.setObjectName("open_dataset_btn")
        # self.open_dataset_btn.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)

        # Create the next image btn
        # self.next_image_btn = QToolButton(self.content_bar)
        # self.next_image_btn.setAutoRaise(False)
        # self.next_image_btn.setEnabled(False)

        # font = QFont()
        # font.setFamilies("Segoe UI")
        # font.setPointSize(10)

        # self.next_image_btn.setFont(font)

        # icon = QIcon()
        # icon.addPixmap(
        #     QPixmap(":/images/images/arrow_right_sml.png"),
        #     QIcon.Normal,
        #     QIcon.Off
        # )

        # self.next_image_btn.setIcon(icon)
        # self.next_image_btn.setIconSize(QSize(60, 60))
        # # self.next_image_btn.setObjectName("next_image_btn")
        # self.next_image_btn.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)

        # Create the previous image btn
        # self.previous_image_btn = QToolButton(self.content_bar)
        # self.previous_image_btn.setAutoRaise(False)
        # self.previous_image_btn.setEnabled(False)

        # font = QFont()
        # font.setFamilies("Segoe UI")
        # font.setPointSize(10)

        # self.previous_image_btn.setFont(font)

        # icon = QIcon()
        # icon.addPixmap(
        #     QPixmap(":/images/images/arrow_left_sml.png"),
        #     QIcon.Normal,
        #     QIcon.Off
        # )

        # self.previous_image_btn.setIcon(icon)
        # self.previous_image_btn.setIconSize(QSize(60, 60))
        # # self.previous_image_btn.setObjectName("previous_image_btn")
        # self.previous_image_btn.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)

        # Create the content_bar spacer
        self.content_bar_spacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        # Create the content
        self.content = QLabel(self.main_content)
        self.content.setAlignment(Qt.AlignCenter)

        font = QFont()
        font.setFamily("Arial Black")
        font.setItalic(True)
        font.setKerning(True)
        font.setPointSize(20)

        self.content.setFont(font)
        self.content.setObjectName("content")

        size_policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        size_policy.setHorizontalStretch(6)
        size_policy.setHeightForWidth(
            self.content.sizePolicy().hasHeightForWidth())
        size_policy.setVerticalStretch(0)

        self.content.setSizePolicy(size_policy)

        # Add the widgets to the content_bar layout
        # self.content_bar_layout.addWidget(self.open_file_btn)
        # self.content_bar_layout.addWidget(self.open_dataset_btn)
        # self.content_bar_layout.addWidget(self.next_image_btn)
        # self.content_bar_layout.addWidget(self.previous_image_btn)
        self.content_bar_layout.addItem(self.content_bar_spacer)

        # Add the widgets to the main content layout
        self.main_content_layout.addWidget(self.content_bar)
        self.main_content_layout.addWidget(self.content)

        # Add the main content container to the central layout
        self.central_layout.addWidget(self.main_content, 1, 1, 1, 1)
Beispiel #8
0
    def setupUi(self, MainWindow):
        self.acceptButton = False
        self.MainWindow = MainWindow
        MainWindow.setObjectName("MainWindow")
        self.ScRate = GetSystemMetrics(0) / 1920
        MainWindow.resize(552 * self.ScRate, 368 * self.ScRate)
        MainWindow.setMinimumSize(QSize(552 * self.ScRate, 368 * self.ScRate))
        MainWindow.setMaximumSize(QSize(552 * self.ScRate, 368 * self.ScRate))
        MainWindow.setWindowIcon(QIcon(Icons["Standart"]))
        MainWindow.setWindowFlags(Qt.WindowStaysOnTopHint)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayoutWidget = QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QRect(10, 10, 531, 301))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QLabel(self.verticalLayoutWidget)
        self.label.setAlignment(Qt.AlignHCenter | Qt.AlignTop)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.textBrowser = QTextBrowser(self.verticalLayoutWidget)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.checkBox = QCheckBox(self.verticalLayoutWidget)
        font = QFont()
        font.setPointSize(8)
        font.setStrikeOut(False)
        font.setKerning(True)
        self.checkBox.setFont(font)
        self.checkBox.setObjectName("checkBox")
        self.horizontalLayout.addWidget(self.checkBox)
        self.pushButton = QPushButton(self.verticalLayoutWidget)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton.sizePolicy().hasHeightForWidth())
        self.pushButton.setSizePolicy(sizePolicy)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setGeometry(QRect(0, 0, 552, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.checkBox.setDisabled(True)
        self.pushButton.setDisabled(True)

        self.textBrowser.verticalScrollBar().valueChanged.connect(
            self.checkRead)
        self.checkBox.stateChanged.connect(
            lambda val: self.pushButton.setDisabled(False)
            if val else (self.pushButton.setDisabled(True)))
        self.pushButton.clicked.connect(self.emitFunc)

        self.retranslateUi(MainWindow)
        QMetaObject.connectSlotsByName(MainWindow)
Beispiel #9
0
    def __init__(self, appName = "Carla2", libPrefix = None):
        object.__init__(self)

        # try to find styles dir
        stylesDir = ""

        CWDl = CWD.lower()

        if libPrefix is not None:
            stylesDir = os.path.join(libPrefix, "lib", "carla")

        elif CWDl.endswith("resources"):
            if CWDl.endswith("native-plugins%sresources" % os.sep):
                stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "..", "bin"))
            elif "carla-native.lv2" in sys.argv[0]:
                stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lib", "lv2", "carla-native.lv2"))
            else:
                stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lib", "carla"))

        elif CWDl.endswith("source"):
            stylesDir = os.path.abspath(os.path.join(CWD, "..", "bin"))

        if stylesDir:
            QApplication.addLibraryPath(stylesDir)

        elif not config_UseQt5:
            self._createApp(appName)
            return

        # base settings
        settings    = QSettings("falkTX", appName)
        useProTheme = settings.value(CARLA_KEY_MAIN_USE_PRO_THEME, True, type=bool)

        if not useProTheme:
            self._createApp(appName)
            return

        if config_UseQt5:
            # set initial Qt stuff
            customFont = QFont("DejaVu Sans [Book]")
            customFont.setBold(False)
            customFont.setItalic(False)
            customFont.setOverline(False)
            customFont.setKerning(True)
            customFont.setHintingPreference(QFont.PreferFullHinting)
            customFont.setPixelSize(12)
            customFont.setWeight(QFont.Normal)

            QApplication.setDesktopSettingsAware(False)
            QApplication.setFont(customFont)

        # set style
        QApplication.setStyle("carla" if stylesDir else "fusion")

        # create app
        self._createApp(appName)

        if config_UseQt5:
            self.fApp.setFont(customFont)

        self.fApp.setStyle("carla" if stylesDir else "fusion")

        # set palette
        proThemeColor = settings.value(CARLA_KEY_MAIN_PRO_THEME_COLOR, "Black", type=str).lower()

        if proThemeColor == "black":
            self.fPalBlack = QPalette()
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Window, QColor(14, 14, 14))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Window, QColor(17, 17, 17))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Window, QColor(17, 17, 17))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.WindowText, QColor(83, 83, 83))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.WindowText, QColor(240, 240, 240))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.WindowText, QColor(240, 240, 240))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Base, QColor(6, 6, 6))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Base, QColor(7, 7, 7))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Base, QColor(7, 7, 7))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.AlternateBase, QColor(12, 12, 12))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.AlternateBase, QColor(14, 14, 14))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.AlternateBase, QColor(14, 14, 14))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.ToolTipBase, QColor(4, 4, 4))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.ToolTipBase, QColor(4, 4, 4))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.ToolTipBase, QColor(4, 4, 4))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.ToolTipText, QColor(230, 230, 230))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.ToolTipText, QColor(230, 230, 230))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.ToolTipText, QColor(230, 230, 230))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Text, QColor(74, 74, 74))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Text, QColor(230, 230, 230))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Text, QColor(230, 230, 230))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Button, QColor(24, 24, 24))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Button, QColor(28, 28, 28))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Button, QColor(28, 28, 28))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.ButtonText, QColor(90, 90, 90))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.ButtonText, QColor(240, 240, 240))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.ButtonText, QColor(240, 240, 240))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Light, QColor(191, 191, 191))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Light, QColor(191, 191, 191))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Light, QColor(191, 191, 191))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Midlight, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Midlight, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Midlight, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Dark, QColor(129, 129, 129))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Dark, QColor(129, 129, 129))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Dark, QColor(129, 129, 129))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Mid, QColor(94, 94, 94))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Mid, QColor(94, 94, 94))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Mid, QColor(94, 94, 94))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Shadow, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Shadow, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Shadow, QColor(155, 155, 155))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Highlight, QColor(14, 14, 14))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Highlight, QColor(60, 60, 60))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Highlight, QColor(34, 34, 34))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.HighlightedText, QColor(83, 83, 83))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.HighlightedText, QColor(255, 255, 255))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.HighlightedText, QColor(240, 240, 240))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.Link, QColor(34, 34, 74))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.Link, QColor(100, 100, 230))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.Link, QColor(100, 100, 230))
            self.fPalBlack.setColor(QPalette.Disabled, QPalette.LinkVisited, QColor(74, 34, 74))
            self.fPalBlack.setColor(QPalette.Active,   QPalette.LinkVisited, QColor(230, 100, 230))
            self.fPalBlack.setColor(QPalette.Inactive, QPalette.LinkVisited, QColor(230, 100, 230))
            self.fApp.setPalette(self.fPalBlack)

        elif proThemeColor == "blue":
            self.fPalBlue = QPalette()
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Window, QColor(32, 35, 39))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Window, QColor(37, 40, 45))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Window, QColor(37, 40, 45))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.WindowText, QColor(89, 95, 104))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.WindowText, QColor(223, 237, 255))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.WindowText, QColor(223, 237, 255))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Base, QColor(48, 53, 60))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Base, QColor(55, 61, 69))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Base, QColor(55, 61, 69))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.AlternateBase, QColor(60, 64, 67))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.AlternateBase, QColor(69, 73, 77))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.AlternateBase, QColor(69, 73, 77))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.ToolTipBase, QColor(182, 193, 208))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.ToolTipBase, QColor(182, 193, 208))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.ToolTipBase, QColor(182, 193, 208))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.ToolTipText, QColor(42, 44, 48))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.ToolTipText, QColor(42, 44, 48))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.ToolTipText, QColor(42, 44, 48))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Text, QColor(96, 103, 113))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Text, QColor(210, 222, 240))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Text, QColor(210, 222, 240))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Button, QColor(51, 55, 62))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Button, QColor(59, 63, 71))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Button, QColor(59, 63, 71))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.ButtonText, QColor(98, 104, 114))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.ButtonText, QColor(210, 222, 240))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.ButtonText, QColor(210, 222, 240))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.BrightText, QColor(255, 255, 255))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Light, QColor(59, 64, 72))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Light, QColor(63, 68, 76))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Light, QColor(63, 68, 76))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Midlight, QColor(48, 52, 59))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Midlight, QColor(51, 56, 63))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Midlight, QColor(51, 56, 63))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Dark, QColor(18, 19, 22))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Dark, QColor(20, 22, 25))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Dark, QColor(20, 22, 25))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Mid, QColor(28, 30, 34))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Mid, QColor(32, 35, 39))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Mid, QColor(32, 35, 39))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Shadow, QColor(13, 14, 16))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Shadow, QColor(15, 16, 18))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Shadow, QColor(15, 16, 18))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Highlight, QColor(32, 35, 39))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Highlight, QColor(14, 14, 17))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Highlight, QColor(27, 28, 33))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.HighlightedText, QColor(89, 95, 104))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.HighlightedText, QColor(217, 234, 253))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.HighlightedText, QColor(223, 237, 255))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.Link, QColor(79, 100, 118))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.Link, QColor(156, 212, 255))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.Link, QColor(156, 212, 255))
            self.fPalBlue.setColor(QPalette.Disabled, QPalette.LinkVisited, QColor(51, 74, 118))
            self.fPalBlue.setColor(QPalette.Active,   QPalette.LinkVisited, QColor(64, 128, 255))
            self.fPalBlue.setColor(QPalette.Inactive, QPalette.LinkVisited, QColor(64, 128, 255))
            self.fApp.setPalette(self.fPalBlue)

        print("Using \"%s\" theme" % self.fApp.style().objectName())