From feab9e8b3840f576c65473645ef39e9200c01508 Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Mon, 13 Apr 2026 02:46:44 +0300
Subject: kate: [ui] split a long config line into two

Split a long config line in UI into two, so the UI doesn't get stretched
beyond necessary.

Note: had to manually construct layout structure for the "Delete unused
meta-information after" input to have a better align of the lineedit.

Bug: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/189
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
---
 kate/app/kateconfigdialog.cpp | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/kate/app/kateconfigdialog.cpp b/kate/app/kateconfigdialog.cpp
index 990c163f1..0166b6c55 100644
--- a/kate/app/kateconfigdialog.cpp
+++ b/kate/app/kateconfigdialog.cpp
@@ -176,7 +176,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view )
            this, TQ_SLOT( slotChanged() ) );
 
   // GROUP with the one below: "Meta-informations"
-  bgStartup = new TQButtonGroup( 2, TQt::Horizontal, i18n("Meta-Information"), frGeneral );
+  bgStartup = new TQButtonGroup( 1, TQt::Horizontal, i18n("Meta-Information"), frGeneral );
   lo->addWidget( bgStartup );
 
   // save meta infos
@@ -190,15 +190,20 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view )
   connect( cb_saveMetaInfos, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) );
 
   // meta infos days
-  TQHBox *hbDmf = new TQHBox( bgStartup );
-  hbDmf->setEnabled(KateDocManager::self()->getSaveMetaInfos());
-  TQLabel *lDmf = new TQLabel( i18n("&Delete unused meta-information after:"), hbDmf );
-  sb_daysMetaInfos = new TQSpinBox( 0, 180, 1, hbDmf );
+  TQWidget *wDmf = new TQWidget( bgStartup );
+  wDmf->setEnabled(KateDocManager::self()->getSaveMetaInfos());
+  TQLayout *layDmf = new TQHBoxLayout(wDmf);
+  TQLayout *layLabelDmf = new TQHBoxLayout(layDmf);
+  layLabelDmf->addItem(new TQSpacerItem(20,1, TQSizePolicy::Fixed));
+  TQLabel *lDmf = new TQLabel( i18n("&Delete unused meta-information after:"), wDmf);
+  layLabelDmf->add(lDmf);
+  sb_daysMetaInfos = new TQSpinBox( 0, 180, 1, wDmf );
   sb_daysMetaInfos->setSpecialValueText(i18n("(never)"));
   sb_daysMetaInfos->setSuffix(i18n(" day(s)"));
   sb_daysMetaInfos->setValue( KateDocManager::self()->getDaysMetaInfos() );
+  layDmf->add(sb_daysMetaInfos);
   lDmf->setBuddy( sb_daysMetaInfos );
-  connect( cb_saveMetaInfos, TQ_SIGNAL( toggled( bool ) ), hbDmf, TQ_SLOT( setEnabled( bool ) ) );
+  connect( cb_saveMetaInfos, TQ_SIGNAL( toggled( bool ) ), wDmf, TQ_SLOT( setEnabled( bool ) ) );
   connect( sb_daysMetaInfos, TQ_SIGNAL( valueChanged ( int ) ), this, TQ_SLOT( slotChanged() ) );
 
   lo->addStretch(1); // :-] works correct without autoadd
-- 
cgit v1.2.3

