http://bugs.kde.org/show_bug.cgi?id=164573
Gilles Caulier caulier gilles gmail com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #12 from Gilles Caulier <caulier gilles gmail com> 2008-11-10 18:50:55 --- SVN commit 882414 by cgilles: digiKam from KDE3 : use QScrollView to host sidebar tab content everywhere to improve usability with small screen. Now digiKam can be used on small computer screen, as with EEEPC for ex. TODO: KDE4PORT BUGS: 164573 M +12 -6 libs/imageproperties/cameraitempropertiestab.cpp M +9 -2 libs/imageproperties/imagedescedittab.cpp M +17 -6 libs/imageproperties/imagepropertiescolorstab.cpp M +13 -6 libs/imageproperties/imagepropertiestab.cpp M +15 -19 utilities/imageeditor/editor/editortoolsettings.cpp M +2 -2 utilities/imageeditor/editor/editortoolsettings.h --- branches/extragear/kde3/graphics/digikam/libs/imageproperties/cameraitempropertiestab.cpp #882413:882414 @@ -31,6 +31,7 @@ #include <qcombobox.h> #include <qwhatsthis.h> #include <qframe.h> +#include <qscrollview.h> // KDE includes. @@ -161,14 +162,23 @@ d = new CameraItemPropertiesTabPriv; setupNavigateBar(navBar); - d->settingsArea = new QFrame(this); + + QScrollView *sv = new QScrollView(this); + sv->viewport()->setBackgroundMode(Qt::PaletteBackground); + sv->setResizePolicy(QScrollView::AutoOneFit); + sv->setFrameStyle(QFrame::NoFrame); + + d->settingsArea = new QFrame(sv->viewport()); d->settingsArea->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); d->settingsArea->setLineWidth( style().pixelMetric(QStyle::PM_DefaultFrameWidth, this) ); - QGridLayout *settingsLayout = new QGridLayout(d->settingsArea, 27, 1, KDialog::spacingHint(), 0); + sv->addChild(d->settingsArea); + m_navigateBarLayout->addWidget(sv); // -------------------------------------------------- + QGridLayout *settingsLayout = new QGridLayout(d->settingsArea, 27, 1, KDialog::spacingHint(), 0); + d->title = new QLabel(i18n("<big><b>Camera File Properties</b></big>"), d->settingsArea); d->file = new QLabel(i18n("<b>File</b>:"), d->settingsArea); d->folder = new QLabel(i18n("<b>Folder</b>:"), d->settingsArea); @@ -318,10 +328,6 @@ settingsLayout->addMultiCellWidget(d->labelPhotoWhiteBalance, 26, 26, 1, 1); settingsLayout->setRowStretch(27, 10); settingsLayout->setColStretch(1, 10); - - // -------------------------------------------------- - - m_navigateBarLayout->addWidget(d->settingsArea); } CameraItemPropertiesTab::~CameraItemPropertiesTab() --- branches/extragear/kde3/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #882413:882414 @@ -34,6 +34,7 @@ #include <qiconset.h> #include <qwhatsthis.h> #include <qtooltip.h> +#include <qscrollview.h> // KDE includes. @@ -138,10 +139,16 @@ d = new ImageDescEditTabPriv; setupNavigateBar(navBar); - QWidget *settingsArea = new QWidget(this); - m_navigateBarLayout->addWidget(settingsArea); + QScrollView *sv = new QScrollView(this); + sv->viewport()->setBackgroundMode(Qt::PaletteBackground); + sv->setResizePolicy(QScrollView::AutoOneFit); + sv->setFrameStyle(QFrame::NoFrame); + QWidget *settingsArea = new QWidget(sv->viewport()); + sv->addChild(settingsArea); + m_navigateBarLayout->addWidget(sv); + QGridLayout *settingsLayout = new QGridLayout(settingsArea, 6, 1, KDialog::spacingHint(), KDialog::spacingHint()); --- branches/extragear/kde3/graphics/digikam/libs/imageproperties/imagepropertiescolorstab.cpp #882413:882414 @@ -37,6 +37,7 @@ #include <qpushbutton.h> #include <qtooltip.h> #include <qvbox.h> +#include <qscrollview.h> // KDE includes. @@ -153,9 +154,15 @@ // Histogram tab area ----------------------------------------------------- - QWidget* histogramPage = new QWidget( d->tab ); + QScrollView *sv = new QScrollView(d->tab); + sv->viewport()->setBackgroundMode(Qt::PaletteBackground); + sv->setResizePolicy(QScrollView::AutoOneFit); + sv->setFrameStyle(QFrame::NoFrame); + + QWidget* histogramPage = new QWidget(sv->viewport()); QGridLayout *topLayout = new QGridLayout(histogramPage, 8, 3, KDialog::spacingHint(), KDialog::spacingHint()); + sv->addChild(histogramPage); QLabel *label1 = new QLabel(i18n("Channel:"), histogramPage); label1->setAlignment ( Qt::AlignRight | Qt::AlignVCenter ); @@ -240,8 +247,6 @@ SelectionImageButton->setPixmap( QPixmap( directory + "image-selection.png" ) ); SelectionImageButton->setToggleButton(true); - - // ------------------------------------------------------------- QVBox *histoBox = new QVBox(histogramPage); @@ -329,13 +334,19 @@ topLayout->setColStretch(2, 10); topLayout->setRowStretch(7, 10); - d->tab->insertTab(histogramPage, i18n("Histogram"), ImagePropertiesColorsTabPriv::HISTOGRAM ); + d->tab->insertTab(sv, i18n("Histogram"), ImagePropertiesColorsTabPriv::HISTOGRAM ); // ICC Profiles tab area --------------------------------------- - d->iccProfileWidget = new ICCProfileWidget(d->tab); - d->tab->insertTab(d->iccProfileWidget, i18n("ICC profile"), ImagePropertiesColorsTabPriv::ICCPROFILE); + QScrollView *sv2 = new QScrollView(d->tab); + sv2->viewport()->setBackgroundMode(Qt::PaletteBackground); + sv2->setResizePolicy(QScrollView::AutoOneFit); + sv2->setFrameStyle(QFrame::NoFrame); + d->iccProfileWidget = new ICCProfileWidget(sv2->viewport()); + sv2->addChild(d->iccProfileWidget); + d->tab->insertTab(sv2, i18n("ICC profile"), ImagePropertiesColorsTabPriv::ICCPROFILE); + // ------------------------------------------------------------- connect(d->channelCB, SIGNAL(activated(int)), --- branches/extragear/kde3/graphics/digikam/libs/imageproperties/imagepropertiestab.cpp #882413:882414 @@ -31,6 +31,7 @@ #include <qfileinfo.h> #include <qwhatsthis.h> #include <qframe.h> +#include <qscrollview.h> // KDE includes. @@ -174,10 +175,21 @@ d = new ImagePropertiesTabPriv; setupNavigateBar(navBar); - d->settingsArea = new QFrame(this); + + QScrollView *sv = new QScrollView(this); + sv->viewport()->setBackgroundMode(Qt::PaletteBackground); + sv->setResizePolicy(QScrollView::AutoOneFit); + sv->setFrameStyle(QFrame::NoFrame); + + d->settingsArea = new QFrame(sv->viewport()); d->settingsArea->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); d->settingsArea->setLineWidth( style().pixelMetric(QStyle::PM_DefaultFrameWidth, this) ); + sv->addChild(d->settingsArea); + m_navigateBarLayout->addWidget(sv); + + // -------------------------------------------------- + QGridLayout *settingsLayout = new QGridLayout(d->settingsArea, 33, 1, KDialog::spacingHint(), 0); // -------------------------------------------------- @@ -354,11 +366,6 @@ settingsLayout->setRowStretch(33, 10); settingsLayout->setColStretch(1, 10); - - // -------------------------------------------------- - - m_navigateBarLayout->addWidget(d->settingsArea); - } ImagePropertiesTab::~ImagePropertiesTab() --- branches/extragear/kde3/graphics/digikam/utilities/imageeditor/editor/editortoolsettings.cpp #882413:882414 @@ -23,6 +23,7 @@ // Qt includes. #include <qhbox.h> +#include <qvbox.h> #include <qlabel.h> #include <qlayout.h> #include <qstring.h> @@ -101,22 +102,20 @@ }; EditorToolSettings::EditorToolSettings(int buttonMask, int toolMask, QWidget *parent) - : QWidget(parent) + : QScrollView(parent) { d = new EditorToolSettingsPriv; - // --------------------------------------------------------------- + viewport()->setBackgroundMode(Qt::PaletteBackground); + setResizePolicy(QScrollView::AutoOneFit); + setFrameStyle(QFrame::NoFrame); - QGridLayout* gridSettings = new QGridLayout(this, 4, 2); + QVBox* vbox = new QVBox(viewport()); + addChild(vbox); - d->plainPage = new QWidget(this); - d->guideBox = new QHBox(this); - d->btnBox1 = new QHBox(this); - d->btnBox2 = new QHBox(this); - // --------------------------------------------------------------- - QFrame *frame = new QFrame(this); + QFrame *frame = new QFrame(vbox); frame->setFrameStyle(QFrame::Panel|QFrame::Sunken); QVBoxLayout* vlay = new QVBoxLayout(frame, 5, 0); d->panIconView = new ImagePanIconWidget(360, 240, frame); @@ -131,6 +130,13 @@ // --------------------------------------------------------------- + d->plainPage = new QWidget(vbox); + d->guideBox = new QHBox(vbox); + d->btnBox1 = new QHBox(vbox); + d->btnBox2 = new QHBox(vbox); + + // --------------------------------------------------------------- + new QLabel(i18n("Guide:"), d->guideBox); QLabel *space4 = new QLabel(d->guideBox); d->guideColorBt = new KColorButton(QColor(Qt::red), d->guideBox); @@ -208,16 +214,6 @@ // --------------------------------------------------------------- - gridSettings->addMultiCellWidget(frame, 0, 0, 0, 1); - gridSettings->addMultiCellWidget(d->plainPage, 1, 1, 0, 1); - gridSettings->addMultiCellWidget(d->guideBox, 2, 2, 0, 1); - gridSettings->addMultiCellWidget(d->btnBox2, 3, 3, 0, 1); - gridSettings->addMultiCellWidget(d->btnBox1, 4, 4, 0, 1); - gridSettings->setSpacing(spacingHint()); - gridSettings->setMargin(0); - - // --------------------------------------------------------------- - connect(d->okBtn, SIGNAL(clicked()), this, SIGNAL(signalOkClicked())); --- branches/extragear/kde3/graphics/digikam/utilities/imageeditor/editor/editortoolsettings.h #882413:882414 @@ -25,7 +25,7 @@ // Qt includes. -#include <qwidget.h> +#include <qscrollview.h> // Local includes. @@ -39,7 +39,7 @@ class ImagePanIconWidget; class EditorToolSettingsPriv; -class DIGIKAM_EXPORT EditorToolSettings : public QWidget +class DIGIKAM_EXPORT EditorToolSettings : public QScrollView { Q_OBJECT -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |