-rw-r--r-- | korganizer/mainwindow.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 95bef66..87cef20 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -173,42 +173,45 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | { | 175 | { |
176 | if ( p->mToolBarHorF ) { | 176 | if ( p->mToolBarHorF ) { |
177 | if ( p->mToolBarUpF ) | 177 | if ( p->mToolBarUpF ) |
178 | tbd = Bottom; | 178 | tbd = Bottom; |
179 | else | 179 | else |
180 | tbd = Top; | 180 | tbd = Top; |
181 | } | 181 | } |
182 | else { | 182 | else { |
183 | if ( p->mToolBarUpF ) | 183 | if ( p->mToolBarUpF ) |
184 | tbd = Right; | 184 | tbd = Right; |
185 | else | 185 | else |
186 | tbd = Left; | 186 | tbd = Left; |
187 | } | 187 | } |
188 | filterToolBar = new QPEToolBar ( this ); | 188 | filterToolBar = new QPEToolBar ( this ); |
189 | filterMenubar = new QPEMenuBar( filterToolBar ); | 189 | filterMenubar = new QMenuBar( filterToolBar ); |
190 | QFontMetrics fm ( filterMenubar->font() ); | 190 | QFontMetrics fm ( filterMenubar->font() ); |
191 | 191 | ||
192 | filterPopupMenu = new QPopupMenu( this ); | 192 | filterPopupMenu = new QPopupMenu( this ); |
193 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 193 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
194 | QString addTest = "Ax"; | 194 | QString addTest = "A"; |
195 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | ||
195 | #ifdef DESKTOP_VERSION | 196 | #ifdef DESKTOP_VERSION |
196 | addTest = "AAAx"; | 197 | addTest = "AAABBBCCCx"; |
197 | #endif | 198 | #else |
198 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) ); | 199 | addTest = "AAx"; |
200 | #endif | ||
201 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | ||
199 | addToolBar (filterToolBar , tbd ); | 202 | addToolBar (filterToolBar , tbd ); |
200 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 203 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
201 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 204 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
202 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 205 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
203 | filterToolBar->hide(); | 206 | filterToolBar->hide(); |
204 | } else { | 207 | } else { |
205 | filterToolBar = 0; | 208 | filterToolBar = 0; |
206 | filterMenubar = 0; | 209 | filterMenubar = 0; |
207 | filterPopupMenu = 0; | 210 | filterPopupMenu = 0; |
208 | } | 211 | } |
209 | if ( p->mShowIconOnetoolbar ) { | 212 | if ( p->mShowIconOnetoolbar ) { |
210 | viewToolBar = iconToolBar ; | 213 | viewToolBar = iconToolBar ; |
211 | navigatorToolBar = iconToolBar ; | 214 | navigatorToolBar = iconToolBar ; |
212 | } else { | 215 | } else { |
213 | #ifndef DESKTOP_VERSION | 216 | #ifndef DESKTOP_VERSION |
214 | setToolBarsMovable( false ); | 217 | setToolBarsMovable( false ); |