Explicitly set color since default differs on some platforms
This commit is contained in:
parent
3420a4f198
commit
fe53f1bf7b
3 changed files with 11 additions and 3 deletions
9
convo.py
9
convo.py
|
@ -531,7 +531,14 @@ class PesterInput(QtWidgets.QLineEdit):
|
||||||
super(PesterInput, self).__init__(parent)
|
super(PesterInput, self).__init__(parent)
|
||||||
self.changeTheme(theme)
|
self.changeTheme(theme)
|
||||||
def changeTheme(self, theme):
|
def changeTheme(self, theme):
|
||||||
self.setStyleSheet(theme[self.stylesheet_path])
|
# Explicitly set color if not already set.
|
||||||
|
# (Some platforms seem to default to white instead of black.)
|
||||||
|
|
||||||
|
StyleSheet = theme[self.stylesheet_path]
|
||||||
|
if "color:" not in theme[self.stylesheet_path].replace(' ', ''):
|
||||||
|
StyleSheet = "color: black; " + StyleSheet
|
||||||
|
self.setStyleSheet(StyleSheet)
|
||||||
|
|
||||||
def focusInEvent(self, event):
|
def focusInEvent(self, event):
|
||||||
self.parent().clearNewMessage()
|
self.parent().clearNewMessage()
|
||||||
self.parent().textArea.textCursor().clearSelection()
|
self.parent().textArea.textCursor().clearSelection()
|
||||||
|
|
1
memos.py
1
memos.py
|
@ -386,6 +386,7 @@ class PesterMemo(PesterConvo):
|
||||||
|
|
||||||
self.textArea = MemoText(self.mainwindow.theme, self)
|
self.textArea = MemoText(self.mainwindow.theme, self)
|
||||||
self.textInput = MemoInput(self.mainwindow.theme, self)
|
self.textInput = MemoInput(self.mainwindow.theme, self)
|
||||||
|
print(self.textInput)
|
||||||
self.textInput.setFocus()
|
self.textInput.setFocus()
|
||||||
|
|
||||||
self.miniUserlist = QtWidgets.QPushButton(">\n>", self)
|
self.miniUserlist = QtWidgets.QPushButton(">\n>", self)
|
||||||
|
|
|
@ -255,7 +255,7 @@
|
||||||
"style": "background: white; font-size: 14px;font:bold; border:2px solid #c48a00;text-align:center; margin-right:10px; margin-left:10px;font-family: 'Courier'"
|
"style": "background: white; font-size: 14px;font:bold; border:2px solid #c48a00;text-align:center; margin-right:10px; margin-left:10px;font-family: 'Courier'"
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
"style": "background: white; border:2px solid #c48a00;margin-top:5px; margin-right:10px; margin-left:10px; font-size: 12px;font-family: 'Courier'"
|
"style": "color: black; background: white; border:2px solid #c48a00;margin-top:5px; margin-right:10px; margin-left:10px; font-size: 12px;font-family: 'Courier'"
|
||||||
},
|
},
|
||||||
"tabwindow" : {
|
"tabwindow" : {
|
||||||
"style": "background-color:#fdb302;border:0px"
|
"style": "background-color:#fdb302;border:0px"
|
||||||
|
@ -303,7 +303,7 @@
|
||||||
"minheight": 47,
|
"minheight": 47,
|
||||||
"maxheight": 47
|
"maxheight": 47
|
||||||
},
|
},
|
||||||
"input": { "style": "background: white; border:2px solid #c48a00;margin-top:5px; margin-right:10px; margin-left:10px; font-size: 12px;" },
|
"input": { "style": "color: black; background: white; border:2px solid #c48a00;margin-top:5px; margin-right:10px; margin-left:10px; font-size: 12px;" },
|
||||||
"textarea": { "style": "background: white; font-size: 14px;font:bold; border:2px solid #c48a00;text-align:center; margin-right:10px; margin-left:10px;" },
|
"textarea": { "style": "background: white; font-size: 14px;font:bold; border:2px solid #c48a00;text-align:center; margin-right:10px; margin-left:10px;" },
|
||||||
"margins": {"top": 0, "bottom": 6, "left": 0, "right": 0 },
|
"margins": {"top": 0, "bottom": 6, "left": 0, "right": 0 },
|
||||||
"userlist": { "width": 150,
|
"userlist": { "width": 150,
|
||||||
|
|
Loading…
Reference in a new issue