mirror of https://github.com/odrling/Aegisub
Correct wxStyledTextCtrl::StartStyling for wx 3.1
This commit is contained in:
parent
6ff1729303
commit
93b2794c85
|
@ -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) {
|
||||
collection_log->StartStyling(pos, 31);
|
||||
#if wxVERSION_NUMBER >= 3100
|
||||
collection_log->StartStyling(pos);
|
||||
#else
|
||||
collection_log->StartStyling(pos, 255);
|
||||
#endif
|
||||
collection_log->SetStyling(utf8.length(), str.first);
|
||||
}
|
||||
collection_log->GotoPos(pos + utf8.length());
|
||||
|
|
|
@ -246,7 +246,11 @@ void DialogTranslation::UpdateDisplay() {
|
|||
int initial_pos = original_text->GetLength();
|
||||
original_text->AppendTextRaw(block->GetText().c_str());
|
||||
if (i == cur_block) {
|
||||
original_text->StartStyling(initial_pos, 31);
|
||||
#if wxVERSION_NUMBER >= 3100
|
||||
original_text->StartStyling(initial_pos);
|
||||
#else
|
||||
original_text->StartStyling(initial_pos, 255);
|
||||
#endif
|
||||
original_text->SetStyling(block->GetText().size(), 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,7 +261,11 @@ void SubsTextEditCtrl::UpdateStyle() {
|
|||
cursor_pos = -1;
|
||||
UpdateCallTip();
|
||||
|
||||
StartStyling(0,255);
|
||||
#if wxVERSION_NUMBER >= 3100
|
||||
StartStyling(0);
|
||||
#else
|
||||
StartStyling(0, 255);
|
||||
#endif
|
||||
|
||||
if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) {
|
||||
SetStyling(line_text.size(), 0);
|
||||
|
|
Loading…
Reference in New Issue