| 25 | } |
| 26 | |
| 27 | void MsgViewUi::StyleGroup() |
| 28 | { |
| 29 | setProperty(Prop::style_group, "frame"); |
| 30 | style_set_group(ui.title_widget, "title"); |
| 31 | style_set_group(ui.content_widget, "client"); |
| 32 | style_set_group(ui.title_close_button, "title-close_button"); |
| 33 | style_set_group(ui.text, "text_edit"); |
| 34 | style_set_group(ui.filter_msg_check, "check"); |
| 35 | style_set_group(ui.filter_war_check, "check"); |
| 36 | style_set_group(ui.filter_err_check, "check"); |
| 37 | |
| 38 | style_set_group(ui.line, "action_table"); |
| 39 | style_set_group(ui.line->horizontalHeader(), "action_table_header"); |
| 40 | style_set_group(ui.line->verticalHeader(), "action_table_header"); |
| 41 | ui.line->setStyleSheet("QTableCornerButton::section,QHeaderView::section,QScrollBar,QScrollBar::sub-line,QScrollBar::add-line{background-color:rgba(0,0,0,0);border:none}QScrollBar::handle{background-color:rgba(128,128,128,0.3);border:none}"); |
| 42 | if ("table corner button") |
| 43 | { |
| 44 | const QObjectList& objs = ui.line->children(); |
| 45 | for (size_t i = 0; i < objs.size(); i++) |
| 46 | { |
| 47 | const QObject* obj = objs[i]; |
| 48 | QString name = obj->metaObject()->className(); |
| 49 | if (name == "QTableCornerButton") |
| 50 | { |
| 51 | QWidget* corner = (QWidget*)obj; |
| 52 | QHBoxLayout* box = new QHBoxLayout(corner); |
| 53 | box->setContentsMargins(0, 0, 0, 0); |
| 54 | QWidget* widget = new QWidget(corner); |
| 55 | box->addWidget(widget); |
| 56 | style_set_group(corner, "action_table_header"); |
| 57 | style_set_group(widget, "action_table_header"); |
| 58 | break; |
| 59 | } |
| 60 | else if (name == "QLineEdit") |
| 61 | { |
| 62 | QLineEdit* lineEdit = (QLineEdit*)obj; |
| 63 | style_set_group(lineEdit, "action_table_header"); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | void MsgViewUi::LoadLanguage() |
| 69 | { |
| 70 | std::call_once(lang_once, [this] { |
nothing calls this directly
no test coverage detected