summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedialogs.cpp54
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
@@ -48,10 +48,11 @@ StyleChanger::StyleChanger( QWidget *parent )
48{ 48{
49 QLabel *label; 49 QLabel *label;
50 50
51 QGridLayout *glay = new QGridLayout( this, 4, 3, 0, KDialog::spacingHint() ); 51 QGridLayout *glay = new QGridLayout( this, 2, 6, 0, KDialog::spacingHint() );
52 CHECK_PTR(glay); 52 CHECK_PTR(glay);
53 glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better 53 glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better
54 glay->setColStretch( 2, 10 ); 54 glay->addColSpacing( 3, KDialog::spacingHint() );
55 glay->addColSpacing( 5, KDialog::spacingHint() );
55 56
56 col = new KColorButton(this); 57 col = new KColorButton(this);
57 CHECK_PTR(col); 58 CHECK_PTR(col);
@@ -66,18 +67,18 @@ StyleChanger::StyleChanger( QWidget *parent )
66 connect(selCol,SIGNAL(changed(const QColor&)),this,SLOT(changed())); 67 connect(selCol,SIGNAL(changed(const QColor&)),this,SLOT(changed()));
67 label = new QLabel(selCol,i18n("Selected:"),this); 68 label = new QLabel(selCol,i18n("Selected:"),this);
68 CHECK_PTR(label); 69 CHECK_PTR(label);
69 glay->addWidget(label,2,0); 70 glay->addWidget(label,0,2);
70 glay->addWidget(selCol,3,0); 71 glay->addWidget(selCol,1,2);
71 72
72 bold = new QCheckBox(i18n("Bold"),this); 73 bold = new QCheckBox(i18n("Bold"),this);
73 CHECK_PTR(bold); 74 CHECK_PTR(bold);
74 connect(bold,SIGNAL(clicked()),SLOT(changed())); 75 connect(bold,SIGNAL(clicked()),SLOT(changed()));
75 glay->addWidget(bold,1,2); 76 glay->addWidget(bold,0,4);
76 77
77 italic = new QCheckBox(i18n("Italic"),this); 78 italic = new QCheckBox(i18n("Italic"),this);
78 CHECK_PTR(italic); 79 CHECK_PTR(italic);
79 connect(italic,SIGNAL(clicked()),SLOT(changed())); 80 connect(italic,SIGNAL(clicked()),SLOT(changed()));
80 glay->addWidget(italic,2,2); 81 glay->addWidget(italic,1,4);
81} 82}
82 83
83void StyleChanger::setRef(ItemStyle *s) { 84void StyleChanger::setRef(ItemStyle *s) {
@@ -156,21 +157,16 @@ HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *st
156 157
157 QFrame *page2 = new QFrame(this); 158 QFrame *page2 = new QFrame(this);
158 addTab(page2,i18n("&Highlight Modes")); 159 addTab(page2,i18n("&Highlight Modes"));
159 //grid = new QGridLayout(page2,2,2);
160 QVBoxLayout *bl=new QVBoxLayout(page2); 160 QVBoxLayout *bl=new QVBoxLayout(page2);
161 bl->setAutoAdd(true); 161 bl->setAutoAdd(true);
162 QHGroupBox *hbox1 = new QHGroupBox( i18n("Config Select"), page2 ); 162 QGroupBox *gbox1 = new QGroupBox( 2, Qt::Horizontal, i18n("Config Select"), page2 );
163 hbox1->layout()->setMargin(5); 163 gbox1->layout()->setMargin(5);
164 QVBox *vbox1=new QVBox(hbox1); 164 QGroupBox *gbox2 = new QGroupBox( 2, Qt::Horizontal, i18n("Item Style"), page2 );
165// grid->addMultiCellWidget(vbox1,0,0,0,1); 165 gbox2->layout()->setMargin(5);
166 QVGroupBox *vbox2 = new QVGroupBox( i18n("Item Style"), page2 ); 166
167// grid->addWidget(vbox2,1,0); 167 QLabel *label = new QLabel( i18n("Highlight:"), gbox1 );
168 QVGroupBox *vbox3 = new QVGroupBox( i18n("Highlight Auto Select"), hbox1 ); 168 hlCombo = new QComboBox( false, gbox1 );
169 //grid->addWidget(vbox3,1,1); 169 hlCombo->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Minimum ) );
170
171 QLabel *label = new QLabel( i18n("Highlight:"), vbox1 );
172 hlCombo = new QComboBox( false, vbox1 );
173 QHBox *modHl = new QHBox(vbox1);
174// connect(new QPushButton(i18n("New"),modHl),SIGNAL(clicked()),this,SLOT(hlNew())); 170// connect(new QPushButton(i18n("New"),modHl),SIGNAL(clicked()),this,SLOT(hlNew()));
175// connect(new QPushButton(i18n("Edit"),modHl),SIGNAL(clicked()),this,SLOT(hlEdit())); 171// connect(new QPushButton(i18n("Edit"),modHl),SIGNAL(clicked()),this,SLOT(hlEdit()));
176 connect( hlCombo, SIGNAL(activated(int)), 172 connect( hlCombo, SIGNAL(activated(int)),
@@ -180,20 +176,20 @@ HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *st
180 } 176 }
181 hlCombo->setCurrentItem(hlNumber); 177 hlCombo->setCurrentItem(hlNumber);
182 178
179 label = new QLabel( i18n("File Extensions:"), gbox1 );
180 wildcards = new QLineEdit( gbox1 );
181 label = new QLabel( i18n("Mime Types:"), gbox1 );
182 mimetypes = new QLineEdit( gbox1 );
183 183
184 label = new QLabel( i18n("Item:"), vbox2 ); 184 label = new QLabel( i18n("Item:"), gbox2 );
185 itemCombo = new QComboBox( false, vbox2 ); 185 itemCombo = new QComboBox( false, gbox2 );
186 connect( itemCombo, SIGNAL(activated(int)), this, SLOT(itemChanged(int)) ); 186 connect( itemCombo, SIGNAL(activated(int)), this, SLOT(itemChanged(int)) );
187 187
188 label = new QLabel( i18n("File Extensions:"), vbox3 ); 188 styleDefault = new QCheckBox(i18n("Default"), gbox2 );
189 wildcards = new QLineEdit( vbox3 );
190 label = new QLabel( i18n("Mime Types:"), vbox3 );
191 mimetypes = new QLineEdit( vbox3 );
192
193
194 styleDefault = new QCheckBox(i18n("Default"), vbox2 );
195 connect(styleDefault,SIGNAL(clicked()),SLOT(changed())); 189 connect(styleDefault,SIGNAL(clicked()),SLOT(changed()));
196 styleChanger = new StyleChanger( vbox2 ); 190 gbox2->addSpace(1);
191 gbox2->addSpace(1);
192 styleChanger = new StyleChanger( gbox2 );
197 193
198 hlDataList = highlightDataList; 194 hlDataList = highlightDataList;
199 hlChanged(hlNumber); 195 hlChanged(hlNumber);