-rw-r--r-- | libkdepim/ksyncmanager.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 7319285..184cb39 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -65,13 +65,7 @@ KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, Targ | |||
65 | bar = new QProgressBar ( 1, 0 ); | 65 | bar = new QProgressBar ( 1, 0 ); |
66 | bar->setCaption (""); | 66 | bar->setCaption (""); |
67 | mWriteBackInPast = 2; | 67 | mWriteBackInPast = 2; |
68 | int w = 300; | 68 | |
69 | if ( QApplication::desktop()->width() < 320 ) | ||
70 | w = 220; | ||
71 | int h = bar->sizeHint().height() ; | ||
72 | int dw = QApplication::desktop()->width(); | ||
73 | int dh = QApplication::desktop()->height(); | ||
74 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
75 | 69 | ||
76 | } | 70 | } |
77 | 71 | ||
@@ -1009,6 +1003,13 @@ void KSyncManager::showProgressBar(int percentage, QString caption, int total) | |||
1009 | { | 1003 | { |
1010 | if (!bar->isVisible()) | 1004 | if (!bar->isVisible()) |
1011 | { | 1005 | { |
1006 | int w = 300; | ||
1007 | if ( QApplication::desktop()->width() < 320 ) | ||
1008 | w = 220; | ||
1009 | int h = bar->sizeHint().height() ; | ||
1010 | int dw = QApplication::desktop()->width(); | ||
1011 | int dh = QApplication::desktop()->height(); | ||
1012 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
1012 | bar->setCaption (caption); | 1013 | bar->setCaption (caption); |
1013 | bar->setTotalSteps ( total ) ; | 1014 | bar->setTotalSteps ( total ) ; |
1014 | bar->show(); | 1015 | bar->show(); |