Reorganize interface/editor setttings

This commit is contained in:
kobewi
2026-01-15 01:47:43 +01:00
parent 95535167b3
commit 1b543e85cf
29 changed files with 365 additions and 286 deletions
+4 -4
View File
@@ -1611,7 +1611,7 @@ void CodeTextEditor::_update_text_editor_theme() {
}
void CodeTextEditor::_update_font_ligatures() {
int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
int ot_mode = EDITOR_GET("interface/editor/fonts/code_font_contextual_ligatures");
Ref<FontVariation> fc = text_editor->get_theme_font(SceneStringName(font));
if (fc.is_valid()) {
@@ -1622,7 +1622,7 @@ void CodeTextEditor::_update_font_ligatures() {
fc->set_opentype_features(ftrs);
} break;
case 2: { // Custom.
Vector<String> subtag = String(EDITOR_GET("interface/editor/code_font_custom_opentype_features")).split(",");
Vector<String> subtag = String(EDITOR_GET("interface/editor/fonts/code_font_custom_opentype_features")).split(",");
Dictionary ftrs;
for (int i = 0; i < subtag.size(); i++) {
Vector<String> subtag_a = subtag[i].split("=");
@@ -1640,7 +1640,7 @@ void CodeTextEditor::_update_font_ligatures() {
fc->set_opentype_features(ftrs);
} break;
}
Vector<String> variation_tags = String(EDITOR_GET("interface/editor/code_font_custom_variations")).split(",");
Vector<String> variation_tags = String(EDITOR_GET("interface/editor/fonts/code_font_custom_variations")).split(",");
Dictionary variations_mono;
for (int i = 0; i < variation_tags.size(); i++) {
Vector<String> subtag_a = variation_tags[i].split("=");
@@ -1861,7 +1861,7 @@ void CodeTextEditor::_zoom_to(float p_zoom_factor) {
void CodeTextEditor::set_zoom_factor(float p_zoom_factor) {
zoom_factor = CLAMP(p_zoom_factor, 0.25f, 3.0f);
int neutral_font_size = int(EDITOR_GET("interface/editor/code_font_size")) * EDSCALE;
int neutral_font_size = int(EDITOR_GET("interface/editor/fonts/code_font_size")) * EDSCALE;
int new_font_size = Math::round(zoom_factor * neutral_font_size);
zoom_button->set_text(itos(Math::round(zoom_factor * 100)) + " %");