[Kst] branches/work/kst/portto4/kst/src/libkstapp
Mike Fenton
mike at staikos.net
Thu Jul 9 16:40:32 CEST 2009
SVN commit 993806 by fenton:
Fix sizing of PlotItemDialog by limiting the growth of the dialog.
M +2 -2 dialog.cpp
M +1 -1 dialog.h
M +2 -2 plotitemdialog.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/dialog.cpp #993805:993806
@@ -41,7 +41,7 @@
}
-void Dialog::addDialogPage(DialogPage *page) {
+void Dialog::addDialogPage(DialogPage *page, bool addMinSize) {
connect(page, SIGNAL(modified()), this, SLOT(modified()));
connect(this, SIGNAL(apply()), page, SIGNAL(apply()));
QListWidgetItem *item = new QListWidgetItem(page->pageIcon(), page->pageTitle(), _listWidget);
@@ -49,7 +49,7 @@
_stackedWidget->addWidget(page);
_itemHash.insert(item, page);
int itemWidth = _listWidget->visualItemRect(item).width() + 4;
- if (_listWidget->width() < itemWidth) {
+ if (addMinSize && _listWidget->width() < itemWidth) {
_listWidget->setMinimumSize(itemWidth, _listWidget->size().height());
}
}
--- branches/work/kst/portto4/kst/src/libkstapp/dialog.h #993805:993806
@@ -32,7 +32,7 @@
Dialog(QWidget *parent = 0);
virtual ~Dialog();
- void addDialogPage(DialogPage *page);
+ void addDialogPage(DialogPage *page, bool addMinSize = true);
void removeDialogPage(DialogPage *page);
DialogPage* getDialogPage(const QString &pageName);
void selectDialogPage(DialogPage *page);
--- branches/work/kst/portto4/kst/src/libkstapp/plotitemdialog.cpp #993805:993806
@@ -378,7 +378,7 @@
DialogPage *curvePage = new DialogPage(this);
curvePage->setPageTitle(curve->Name());
curvePage->addDialogTab(curveTab);
- addDialogPage(curvePage);
+ addDialogPage(curvePage, false);
_relationPages.append(curvePage);
} else if (ImagePtr image = kst_cast<Image>(relation)) {
ImageTab* imageTab = new ImageTab(this);
@@ -415,7 +415,7 @@
DialogPage *imagePage = new DialogPage(this);
imagePage->setPageTitle(image->Name());
imagePage->addDialogTab(imageTab);
- addDialogPage(imagePage);
+ addDialogPage(imagePage, false);
_relationPages.append(imagePage);
}
}
More information about the Kst
mailing list