mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
Revert "[DetailsView] Improve zooming"
This reverts commit 7908aff3b5
.
Reverting this commit will fix the issue of not being able to rename
the last file in Details View and will also make the items in Details
View and Compact View have the same height.
BUG: 447215
FIXED-IN: 21.12.2
This commit is contained in:
parent
9d08bb5b97
commit
43e915213e
|
@ -226,22 +226,8 @@ void KStandardItemListWidgetInformant::calculateCompactLayoutItemSizeHints(QVect
|
|||
void KStandardItemListWidgetInformant::calculateDetailsLayoutItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const
|
||||
{
|
||||
const KItemListStyleOption& option = view->styleOption();
|
||||
|
||||
float zoomLevel = 1;
|
||||
if (option.iconSize >= KIconLoader::SizeEnormous) {
|
||||
zoomLevel = 2;
|
||||
} else if (option.iconSize >= KIconLoader::SizeHuge) {
|
||||
zoomLevel = 1.8;
|
||||
} else if (option.iconSize >= KIconLoader::SizeLarge) {
|
||||
zoomLevel = 1.6;
|
||||
} else if (option.iconSize >= KIconLoader::SizeMedium) {
|
||||
zoomLevel = 1.4;
|
||||
} else if (option.iconSize >= KIconLoader::SizeSmallMedium) {
|
||||
zoomLevel = 1.2;
|
||||
}
|
||||
|
||||
const qreal contentHeight = qMax<qreal>(option.iconSize, zoomLevel * option.fontMetrics.height());
|
||||
logicalHeightHints.fill(contentHeight + 2 * option.padding);
|
||||
const qreal height = option.padding * 2 + qMax(option.iconSize, option.fontMetrics.height());
|
||||
logicalHeightHints.fill(height);
|
||||
logicalWidthHint = -1.0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue