Skip to content

Commit 37011fc

Browse files
Remove background-color stylesheet from the set_qfont (allowing stylesheets to properly initialize custom backgrounds for labels w/ transparent ones)
rename "set_dropdown_ to "set_stylesheet" cuz that's what it is
1 parent ee918a4 commit 37011fc

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

include/courtroom.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ class Courtroom : public QMainWindow {
143143
void set_fonts(QString p_char = "");
144144

145145
// sets dropdown menu stylesheet
146-
void set_dropdown(QWidget *widget);
146+
void set_stylesheet(QWidget *widget);
147147

148148
// helper funciton that call above function on the relevant widgets
149-
void set_dropdowns();
149+
void set_stylesheets();
150150

151151
void set_window_title(QString p_title);
152152

src/courtroom.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ void Courtroom::set_fonts(QString p_char)
10431043
for (int i = 0; i < max_clocks; i++)
10441044
set_font(ui_clock[i], "", "clock_" + QString::number(i), p_char);
10451045

1046-
set_dropdowns();
1046+
set_stylesheets();
10471047
}
10481048

10491049
void Courtroom::set_font(QWidget *widget, QString class_name,
@@ -1105,28 +1105,23 @@ void Courtroom::set_qfont(QWidget *widget, QString class_name, QFont font,
11051105
widget->setFont(font);
11061106

11071107
QString style_sheet_string =
1108-
class_name + " { background-color: rgba(0, 0, 0, 0);\n" + "color: rgba(" +
1108+
class_name + " { color: rgba(" +
11091109
QString::number(f_color.red()) + ", " + QString::number(f_color.green()) +
11101110
", " + QString::number(f_color.blue()) + ", 255);}";
11111111
widget->setStyleSheet(style_sheet_string);
11121112
}
11131113

1114-
void Courtroom::set_dropdown(QWidget *widget)
1114+
void Courtroom::set_stylesheet(QWidget *widget)
11151115
{
11161116
QString f_file = "courtroom_stylesheets.css";
11171117
QString style_sheet_string = ao_app->get_stylesheet(f_file);
11181118
if (style_sheet_string != "")
11191119
widget->setStyleSheet(style_sheet_string);
11201120
}
11211121

1122-
void Courtroom::set_dropdowns()
1122+
void Courtroom::set_stylesheets()
11231123
{
1124-
set_dropdown(
1125-
this); // EXPERIMENTAL - Read the style-sheet as-is for maximum memeage
1126-
// set_dropdown(ui_text_color, "[TEXT COLOR]");
1127-
// set_dropdown(ui_pos_dropdown, "[POS DROPDOWN]");
1128-
// set_dropdown(ui_emote_dropdown, "[EMOTE DROPDOWN]");
1129-
// set_dropdown(ui_mute_list, "[MUTE LIST]");
1124+
set_stylesheet(this);
11301125
}
11311126

11321127
void Courtroom::set_window_title(QString p_title)

0 commit comments

Comments
 (0)