MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / resetFontSize

Method resetFontSize

QKeyMapper/qinputdevicelistwindow.cpp:56–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void QInputDeviceListWindow::resetFontSize()
57{
58 QFont customFont;
59 if (LANGUAGE_ENGLISH == QKeyMapper::getLanguageIndex()) {
60 customFont = QFont(FONTNAME_ENGLISH, 9);
61 }
62 else if (LANGUAGE_JAPANESE == QKeyMapper::getLanguageIndex()) {
63 customFont = QFont(FONTNAME_ENGLISH, 9);
64 }
65 else {
66 customFont = QFont(FONTNAME_ENGLISH, 9);
67 // customFont = QFont(FONTNAME_CHINESE, 9, QFont::Bold);
68 }
69
70 int scale = QKeyMapper::getInstance()->m_UI_Scale;
71
72 if (LANGUAGE_ENGLISH == QKeyMapper::getLanguageIndex()) {
73 if (UI_SCALE_4K_PERCENT_150 == scale) {
74 customFont.setPointSize(11);
75 }
76 else {
77 customFont.setPointSize(9);
78 }
79 }
80 else if (LANGUAGE_JAPANESE == QKeyMapper::getLanguageIndex()) {
81 if (UI_SCALE_4K_PERCENT_150 == scale) {
82 customFont.setPointSize(11);
83 }
84 else {
85 customFont.setPointSize(9);
86 }
87 }
88 else {
89 if (UI_SCALE_4K_PERCENT_150 == scale) {
90 customFont.setPointSize(11);
91 }
92 else {
93 customFont.setPointSize(9);
94 }
95 // if (UI_SCALE_4K_PERCENT_150 == scale) {
96 // customFont.setPointSize(13);
97 // }
98 // else {
99 // customFont.setPointSize(11);
100 // }
101 }
102
103 ui->keyboardLabel->setFont(customFont);
104 ui->mouseLabel->setFont(customFont);
105
106 if (UI_SCALE_4K_PERCENT_150 == scale) {
107 customFont.setPointSize(11);
108 }
109 else {
110 customFont.setPointSize(9);
111 }
112
113 ui->confirmButton->setFont(customFont);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected