- // Showing of this widget is normally animated. We hide it for now and make it small.
- hide();
- setMaximumHeight(0);
-
- setToolTip(KToolTipHelper::whatsThisHintOnly());
- setWhatsThis(xi18nc("@info:whatsthis", "<title>Selection Mode</title><para>Select files or folders to manage or manipulate them."
- "<list><item>Press on a file or folder to select it.</item><item>Press on an already selected file or folder to deselect it.</item>"
- "<item>Pressing an empty area does <emphasis>not</emphasis> clear the selection.</item>"
- "<item>Selection rectangles (created by dragging from an empty area) invert the selection status of items within.</item></list></para>"
- "<para>The available action buttons at the bottom change depending on the current selection.</para>"));
-
- auto fillParentLayout = new QGridLayout(this);
- fillParentLayout->setContentsMargins(0, 0, 0, 0);
-
- // Put the contents into a QScrollArea. This prevents increasing the view width
- // in case that not enough width for the contents is available. (this trick is also used in bottombar.cpp.)
- auto scrollArea = new QScrollArea(this);
- fillParentLayout->addWidget(scrollArea);
- scrollArea->setFrameShape(QFrame::NoFrame);
- scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- scrollArea->setWidgetResizable(true);
-
- auto contentsContainer = new QWidget(scrollArea);
- scrollArea->setWidget(contentsContainer);