From 90d40eb95e90efbd2a954fad8275cc2399e49e02 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 13 May 2023 18:38:33 +0200 Subject: [PATCH] Add labels to encoding variant combo --- src/frontends/qt/GuiDocument.cpp | 12 ++ src/frontends/qt/ui/LanguageUi.ui | 208 +++++++++++++++++------------- 2 files changed, 133 insertions(+), 87 deletions(-) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index 99bf93dbab..e8c8c19e8a 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -2536,6 +2536,18 @@ void GuiDocument::encodingSwitched(int i) langModule->unicodeEncodingCO->setVisible(i == EncodingSets::unicode); langModule->autoEncodingCO->setVisible(i == EncodingSets::legacy); langModule->customEncodingCO->setVisible(i == EncodingSets::custom); + switch (i) { + case EncodingSets::unicode: + langModule->encodingVariantLA->setBuddy(langModule->unicodeEncodingCO); + break; + case EncodingSets::legacy: + langModule->encodingVariantLA->setBuddy(langModule->autoEncodingCO); + break; + case EncodingSets::custom: + langModule->encodingVariantLA->setBuddy(langModule->customEncodingCO); + break; + } + if (tex_fonts) langModule->unicodeEncodingCO->setItemText(1, qt_("Direct (No inputenc)")); else diff --git a/src/frontends/qt/ui/LanguageUi.ui b/src/frontends/qt/ui/LanguageUi.ui index e211fdf6cc..f1ba383f6e 100644 --- a/src/frontends/qt/ui/LanguageUi.ui +++ b/src/frontends/qt/ui/LanguageUi.ui @@ -7,13 +7,13 @@ 0 0 472 - 253 + 316 - + @@ -65,7 +65,7 @@ - + Qt::Horizontal @@ -81,88 +81,83 @@ - - - - - - &Encoding: - - - encodingCO - - - - - - - true - - - Select encoding of the generated LaTeX source (LaTeX input encoding). - - - false - - - - - - - true - - - Select Unicode encoding variant. - - - - - - - false - - - Specify whether to load the 'inputenc' package. - - - - - - - false - - - Select custom encoding. - - - - - - - Language pa&ckage: - - - languagePackageCO - - - - - - - Select which language package LyX should use - - - - - - - Enter the command to load the language package (default: \usepackage{babel}) - - - - + + + + Encoding + + + + + + + + &Type: + + + encodingCO + + + + + + + true + + + Select encoding of the generated LaTeX source (LaTeX input encoding). + + + false + + + + + + + true + + + Select Unicode encoding variant. + + + + + + + false + + + Specify whether to load the 'inputenc' package. + + + + + + + false + + + Select custom encoding. + + + + + + + &Variant: + + + autoEncodingCO + + + + + + + - + Qt::Horizontal @@ -175,7 +170,48 @@ - + + + + + + Language pa&ckage: + + + languagePackageCO + + + + + + + Select which language package LyX should use + + + + + + + Enter the command to load the language package (default: \usepackage{babel}) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::Vertical @@ -196,8 +232,6 @@ languageCO quoteStyleCO - languagePackageCO - languagePackageLE qt_i18n.h