author | paule <paule> | 2007-01-13 07:27:50 (UTC) |
---|---|---|
committer | paule <paule> | 2007-01-13 07:27:50 (UTC) |
commit | ee43ea083b2abea078507677ee30c7af88d248c4 (patch) (side-by-side diff) | |
tree | e9c61153289247a67f043012c04022cd97ab4767 /noncore | |
parent | 4892c61a3e76c031d7b882854dcb0dfbd575f045 (diff) | |
download | opie-ee43ea083b2abea078507677ee30c7af88d248c4.zip opie-ee43ea083b2abea078507677ee30c7af88d248c4.tar.gz opie-ee43ea083b2abea078507677ee30c7af88d248c4.tar.bz2 |
Improve layout of Highlight Modes tab so that it fits on QVGA screens, allowing the OK/Cancel buttons on the dialog to be shown.
Fixes bug #1373.
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katedialogs.cpp | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedialogs.cpp b/noncore/apps/tinykate/libkate/document/katedialogs.cpp index f4edd7e..b492c26 100644 --- a/noncore/apps/tinykate/libkate/document/katedialogs.cpp +++ b/noncore/apps/tinykate/libkate/document/katedialogs.cpp @@ -50,6 +50,7 @@ StyleChanger::StyleChanger( QWidget *parent ) - QGridLayout *glay = new QGridLayout( this, 4, 3, 0, KDialog::spacingHint() ); + QGridLayout *glay = new QGridLayout( this, 2, 6, 0, KDialog::spacingHint() ); CHECK_PTR(glay); glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better - glay->setColStretch( 2, 10 ); + glay->addColSpacing( 3, KDialog::spacingHint() ); + glay->addColSpacing( 5, KDialog::spacingHint() ); @@ -68,4 +69,4 @@ StyleChanger::StyleChanger( QWidget *parent ) CHECK_PTR(label); - glay->addWidget(label,2,0); - glay->addWidget(selCol,3,0); + glay->addWidget(label,0,2); + glay->addWidget(selCol,1,2); @@ -74,3 +75,3 @@ StyleChanger::StyleChanger( QWidget *parent ) connect(bold,SIGNAL(clicked()),SLOT(changed())); - glay->addWidget(bold,1,2); + glay->addWidget(bold,0,4); @@ -79,3 +80,3 @@ StyleChanger::StyleChanger( QWidget *parent ) connect(italic,SIGNAL(clicked()),SLOT(changed())); - glay->addWidget(italic,2,2); + glay->addWidget(italic,1,4); } @@ -158,17 +159,12 @@ HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *st addTab(page2,i18n("&Highlight Modes")); - //grid = new QGridLayout(page2,2,2); QVBoxLayout *bl=new QVBoxLayout(page2); bl->setAutoAdd(true); - QHGroupBox *hbox1 = new QHGroupBox( i18n("Config Select"), page2 ); - hbox1->layout()->setMargin(5); - QVBox *vbox1=new QVBox(hbox1); -// grid->addMultiCellWidget(vbox1,0,0,0,1); - QVGroupBox *vbox2 = new QVGroupBox( i18n("Item Style"), page2 ); -// grid->addWidget(vbox2,1,0); - QVGroupBox *vbox3 = new QVGroupBox( i18n("Highlight Auto Select"), hbox1 ); - //grid->addWidget(vbox3,1,1); - - QLabel *label = new QLabel( i18n("Highlight:"), vbox1 ); - hlCombo = new QComboBox( false, vbox1 ); - QHBox *modHl = new QHBox(vbox1); + QGroupBox *gbox1 = new QGroupBox( 2, Qt::Horizontal, i18n("Config Select"), page2 ); + gbox1->layout()->setMargin(5); + QGroupBox *gbox2 = new QGroupBox( 2, Qt::Horizontal, i18n("Item Style"), page2 ); + gbox2->layout()->setMargin(5); + + QLabel *label = new QLabel( i18n("Highlight:"), gbox1 ); + hlCombo = new QComboBox( false, gbox1 ); + hlCombo->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Minimum ) ); // connect(new QPushButton(i18n("New"),modHl),SIGNAL(clicked()),this,SLOT(hlNew())); @@ -182,16 +178,16 @@ HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *st + label = new QLabel( i18n("File Extensions:"), gbox1 ); + wildcards = new QLineEdit( gbox1 ); + label = new QLabel( i18n("Mime Types:"), gbox1 ); + mimetypes = new QLineEdit( gbox1 ); - label = new QLabel( i18n("Item:"), vbox2 ); - itemCombo = new QComboBox( false, vbox2 ); + label = new QLabel( i18n("Item:"), gbox2 ); + itemCombo = new QComboBox( false, gbox2 ); connect( itemCombo, SIGNAL(activated(int)), this, SLOT(itemChanged(int)) ); - label = new QLabel( i18n("File Extensions:"), vbox3 ); - wildcards = new QLineEdit( vbox3 ); - label = new QLabel( i18n("Mime Types:"), vbox3 ); - mimetypes = new QLineEdit( vbox3 ); - - - styleDefault = new QCheckBox(i18n("Default"), vbox2 ); + styleDefault = new QCheckBox(i18n("Default"), gbox2 ); connect(styleDefault,SIGNAL(clicked()),SLOT(changed())); - styleChanger = new StyleChanger( vbox2 ); + gbox2->addSpace(1); + gbox2->addSpace(1); + styleChanger = new StyleChanger( gbox2 ); |