From 8aa1a96d71aaaff87d5073329ba845609f5d208a Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 8 Jun 2025 17:15:42 +0800 Subject: [PATCH] Revise Interface section layout in Options dialog The Language option now has its own layout since it is independent to other options (Style and Color scheme). This avoids text in Language combobox to be left out and replaced by `...` due to Style Hint text being too long. PR #22823. --- src/gui/optionsdialog.cpp | 12 +-- src/gui/optionsdialog.ui | 150 +++++++++++++++++++++----------------- 2 files changed, 88 insertions(+), 74 deletions(-) diff --git a/src/gui/optionsdialog.cpp b/src/gui/optionsdialog.cpp index 849dfe55d..2d184daea 100644 --- a/src/gui/optionsdialog.cpp +++ b/src/gui/optionsdialog.cpp @@ -1760,9 +1760,9 @@ void OptionsDialog::initializeStyleCombo() m_ui->labelStyle->hide(); m_ui->comboStyle->hide(); m_ui->labelStyleHint->hide(); - m_ui->UISettingsBoxLayout->removeWidget(m_ui->labelStyle); - m_ui->UISettingsBoxLayout->removeWidget(m_ui->comboStyle); - m_ui->UISettingsBoxLayout->removeWidget(m_ui->labelStyleHint); + m_ui->layoutStyle->removeWidget(m_ui->labelStyle); + m_ui->layoutStyle->removeWidget(m_ui->comboStyle); + m_ui->layoutStyle->removeWidget(m_ui->labelStyleHint); #endif } @@ -1776,9 +1776,9 @@ void OptionsDialog::initializeColorSchemeOptions() #else m_ui->labelColorScheme->hide(); m_ui->comboColorScheme->hide(); - m_ui->UISettingsBoxLayout->removeWidget(m_ui->labelColorScheme); - m_ui->UISettingsBoxLayout->removeWidget(m_ui->comboColorScheme); - m_ui->UISettingsBoxLayout->removeItem(m_ui->spacerColorScheme); + m_ui->layoutStyle->removeWidget(m_ui->labelColorScheme); + m_ui->layoutStyle->removeWidget(m_ui->comboColorScheme); + m_ui->layoutStyle->removeItem(m_ui->spacerColorScheme); #endif } diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index a21f7af04..188a9c564 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -137,8 +137,8 @@ Interface - - + + @@ -150,72 +150,80 @@ - - - - Language: - - + + + + + + Language: + + + + + + + + + + Qt::Orientation::Horizontal + + + + 200 + 20 + + + + + - - + + + + + + Style: + + + + + + + + + + + true + + + + + + + + Color scheme: + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + - - - - Qt::Orientation::Horizontal - - - - 200 - 20 - - - - - - - - Style: - - - - - - - - - - - true - - - - - - - - Color scheme: - - - - - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - + Use custom UI Theme @@ -237,15 +245,21 @@ - + Use icons from system theme - + + + + 0 + 0 + + Customize UI Theme...