1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
diff --git a/src/dialog_fonts_collector.cpp b/src/dialog_fonts_collector.cpp
index 78ac20ef5c..9b71afd752 100644
--- a/src/dialog_fonts_collector.cpp
+++ b/src/dialog_fonts_collector.cpp
@@ -400,7 +400,11 @@ void DialogFontsCollector::OnAddText(ValueEvent<color_str_pair> &event) {
auto const& utf8 = str.second.utf8_str();
collection_log->AppendTextRaw(utf8.data(), utf8.length());
if (str.first) {
+#if wxCHECK_VERSION (3, 1, 0)
+ collection_log->StartStyling(pos);
+#else
collection_log->StartStyling(pos, 31);
+#endif
collection_log->SetStyling(utf8.length(), str.first);
}
collection_log->GotoPos(pos + utf8.length());
diff --git a/src/dialog_translation.cpp b/src/dialog_translation.cpp
index c5fb4ffb85..86f12291c9 100644
--- a/src/dialog_translation.cpp
+++ b/src/dialog_translation.cpp
@@ -244,7 +248,11 @@ void DialogTranslation::UpdateDisplay() {
int initial_pos = original_text->GetLength();
original_text->AppendTextRaw(block->GetText().c_str());
if (i == cur_block) {
+#if wxCHECK_VERSION (3, 1, 0)
+ original_text->StartStyling(initial_pos);
+#else
original_text->StartStyling(initial_pos, 31);
+#endif
original_text->SetStyling(block->GetText().size(), 1);
}
}
diff --git a/src/subs_edit_ctrl.cpp b/src/subs_edit_ctrl.cpp
index 4618ea4097..a44c099e0a 100644
--- a/src/subs_edit_ctrl.cpp
+++ b/src/subs_edit_ctrl.cpp
@@ -261,7 +279,11 @@ void SubsTextEditCtrl::UpdateStyle() {
cursor_pos = -1;
UpdateCallTip();
+#if wxCHECK_VERSION (3, 1, 0)
+ StartStyling(0);
+#else
StartStyling(0,255);
+#endif
if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) {
SetStyling(line_text.size(), 0);
|