mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Qt: fix tty objectname and add tty text color to stylesheet
This commit is contained in:
parent
632c8872cd
commit
3067c8bd27
2 changed files with 6 additions and 3 deletions
|
@ -319,6 +319,7 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
|
|||
QString style_log = QString
|
||||
(
|
||||
"QTextEdit#tty_frame { background-color: #ffffff; }"
|
||||
"QLabel#tty_text { color: #000000; }"
|
||||
"QTextEdit#log_frame { background-color: #ffffff; }"
|
||||
"QLabel#log_level_always { color: #107896; }"
|
||||
"QLabel#log_level_fatal { color: #ff00ff; }"
|
||||
|
|
|
@ -110,7 +110,7 @@ log_frame::log_frame(std::shared_ptr<gui_settings> guiSettings, QWidget *parent)
|
|||
m_log->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
m_tty = new QTextEdit(tabWidget);
|
||||
m_log->setObjectName("tty_frame");
|
||||
m_tty->setObjectName("tty_frame");
|
||||
m_tty->setReadOnly(true);
|
||||
|
||||
tabWidget->addTab(m_log, tr("Log"));
|
||||
|
@ -259,6 +259,7 @@ void log_frame::LoadSettings()
|
|||
m_stackAct->setChecked(m_stack_log);
|
||||
}
|
||||
|
||||
//TODO: repaint old text with new colors
|
||||
void log_frame::RepaintTextColors()
|
||||
{
|
||||
// Get text color. Do this once to prevent possible slowdown
|
||||
|
@ -271,7 +272,10 @@ void log_frame::RepaintTextColors()
|
|||
m_color.append(GUI::get_Label_Color("log_level_warning"));
|
||||
m_color.append(GUI::get_Label_Color("log_level_notice"));
|
||||
m_color.append(GUI::get_Label_Color("log_level_trace"));
|
||||
|
||||
m_color_stack = GUI::get_Label_Color("log_stack");
|
||||
|
||||
m_tty->setTextColor(GUI::get_Label_Color("tty_text"));
|
||||
}
|
||||
|
||||
void log_frame::UpdateUI()
|
||||
|
@ -325,8 +329,6 @@ void log_frame::UpdateUI()
|
|||
// Confirm log level
|
||||
if (packet->sev <= s_gui_listener.enabled)
|
||||
{
|
||||
// Get text color
|
||||
QColor color;
|
||||
QString text;
|
||||
switch (packet->sev)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue