diff options
| author | Crystalwarrior <varsash@gmail.com> | 2021-02-21 15:50:34 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2021-02-21 15:50:34 +0300 |
| commit | 37011fc22d2d821f5370e21b626dc295a002defa (patch) | |
| tree | fc74d1f01993c3b5661d1a48405145c5d78001a0 | |
| parent | ee918a4f818326cba66ec07bf4be57c4d67c08da (diff) | |
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
| -rw-r--r-- | include/courtroom.h | 4 | ||||
| -rw-r--r-- | src/courtroom.cpp | 15 |
2 files changed, 7 insertions, 12 deletions
diff --git a/include/courtroom.h b/include/courtroom.h index bba38b61..2e007d27 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -143,10 +143,10 @@ public: void set_fonts(QString p_char = ""); // sets dropdown menu stylesheet - void set_dropdown(QWidget *widget); + void set_stylesheet(QWidget *widget); // helper funciton that call above function on the relevant widgets - void set_dropdowns(); + void set_stylesheets(); void set_window_title(QString p_title); diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 9c9c6adb..94d7ab8e 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1043,7 +1043,7 @@ void Courtroom::set_fonts(QString p_char) for (int i = 0; i < max_clocks; i++) set_font(ui_clock[i], "", "clock_" + QString::number(i), p_char); - set_dropdowns(); + set_stylesheets(); } void Courtroom::set_font(QWidget *widget, QString class_name, @@ -1105,13 +1105,13 @@ void Courtroom::set_qfont(QWidget *widget, QString class_name, QFont font, widget->setFont(font); QString style_sheet_string = - class_name + " { background-color: rgba(0, 0, 0, 0);\n" + "color: rgba(" + + class_name + " { color: rgba(" + QString::number(f_color.red()) + ", " + QString::number(f_color.green()) + ", " + QString::number(f_color.blue()) + ", 255);}"; widget->setStyleSheet(style_sheet_string); } -void Courtroom::set_dropdown(QWidget *widget) +void Courtroom::set_stylesheet(QWidget *widget) { QString f_file = "courtroom_stylesheets.css"; QString style_sheet_string = ao_app->get_stylesheet(f_file); @@ -1119,14 +1119,9 @@ void Courtroom::set_dropdown(QWidget *widget) widget->setStyleSheet(style_sheet_string); } -void Courtroom::set_dropdowns() +void Courtroom::set_stylesheets() { - set_dropdown( - this); // EXPERIMENTAL - Read the style-sheet as-is for maximum memeage - // set_dropdown(ui_text_color, "[TEXT COLOR]"); - // set_dropdown(ui_pos_dropdown, "[POS DROPDOWN]"); - // set_dropdown(ui_emote_dropdown, "[EMOTE DROPDOWN]"); - // set_dropdown(ui_mute_list, "[MUTE LIST]"); + set_stylesheet(this); } void Courtroom::set_window_title(QString p_title) |
