[Digikam-devel] Re: [Patch] make UI more usable on small screens
Matthias Welwarsky
matthias at welwarsky.de
Sat Feb 26 12:30:05 GMT 2011
On Friday 18 February 2011 10:58:43 Gilles Caulier wrote:
> Mathias,
>
> Some progress over your patch in Bugzilla ?
>
> Gilles Caulier
Gilles, it all boils down to this (trivial) patch:
diff --git a/digikam/views/leftsidebarwidgets.cpp b/digikam/views/leftsidebarwidgets.cpp
index 8cf45b2..61c0d28 100644
--- a/digikam/views/leftsidebarwidgets.cpp
+++ b/digikam/views/leftsidebarwidgets.cpp
@@ -1029,9 +1029,13 @@ GPSSearchSideBarWidget::GPSSearchSideBarWidget(QWidget* parent, SearchModel* sea
d->gpsSearchView = new GPSSearchView(this, searchModel, searchModificationHelper, imageFilterModel, itemSelectionModel);
d->gpsSearchView->setConfigGroup(getConfigGroup());
+ QScrollArea *scrollArea = new QScrollArea(this);
+
QVBoxLayout* layout = new QVBoxLayout(this);
- layout->addWidget(d->gpsSearchView);
+ layout->addWidget(scrollArea);
+ scrollArea->setWidget(d->gpsSearchView);
+ scrollArea->setWidgetResizable(true);
connect(d->gpsSearchView, SIGNAL(signalMapSoloItems(const QList<qlonglong>&, const QString&)),
this, SIGNAL(signalMapSoloItems(const QList<qlonglong>&, const QString&)));
It achieves the same as my previous patch and is much less intrusive.
If no objections, I'll push it to the development/2.0 branch
>
> 2011/2/11 Gilles Caulier <caulier.gilles at gmail.com>:
> > 2011/2/11 Matthias Welwarsky <matze at welwarsky.de>:
> >> On Thursday 10 February 2011 20:46:45 Matthias Welwarsky wrote:
> >>> With the patch, any SidebarWidget derivative actually becomes a
> >>> QScrollArea, which contains the actual tool view. To determine an
> >>> appropriate
> >>> minimumSizeHint(), it requests the minimumSizeHint() of the widget it
> >>> contains and makes sure the width is not larger than 20% of the screen
> >>> width.
> >>>
> >>> Before, the largest minimumSizeHint() of all widgets in the sidebar
> >>> would determine its minimum width. For widgets like the gpssearch this
> >>> was > 300 pixels, which means the sidebar took more than 1/3rd of a
> >>> 1024 pixel screen, no matter which tool was opened.
> >>>
> >>> The patch allows the sidebar to become smaller than what the largest
> >>> tool widget demands. To achieve this, overriding the minimumSizeHint()
> >>> in class SidebarWidget would have been enough, but then tools
> >>> demanding larger size become squeezed pretty badly. Hence the
> >>> addition of a QScrollArea.
> >>
> >> However, there is a problem now that the minimum height becomes too
> >> large. The app window won't resize smaller than 638 pixels high, which
> >> is not good. I'll need to fix that first.
> >
> > Matthias,
> >
> > I recommend you to create a new entry in bugzilla into
> > digiKam/Usability component and attach patch at this place. it's
> > better to follow in time than mailling list...
> >
> > I will check too your future patch with my netbook
> >
> > Gilles Caulier
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
More information about the Digikam-devel
mailing list