X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/15faff457dd5ff609b3d6d824e0366beae1abe28..56888a56:/src/panels/places/placesview.cpp diff --git a/src/panels/places/placesview.cpp b/src/panels/places/placesview.cpp index a298a5250..5214f47dc 100644 --- a/src/panels/places/placesview.cpp +++ b/src/panels/places/placesview.cpp @@ -1,21 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2012 by Frank Reininghaus * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2012 Frank Reininghaus + * SPDX-FileCopyrightText: 2021 Harald Sitter + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesview.h" @@ -24,6 +12,10 @@ PlacesView::PlacesView(QGraphicsWidget* parent) : KStandardItemListView(parent) { + KItemListStyleOption option = styleOption(); + option.padding = 4; + setStyleOption(option); + const int iconSize = PlacesPanelSettings::iconSize(); if (iconSize >= 0) { setIconSize(iconSize); @@ -35,7 +27,7 @@ void PlacesView::setIconSize(int size) if (size != iconSize()) { PlacesPanelSettings* settings = PlacesPanelSettings::self(); settings->setIconSize(size); - settings->writeConfig(); + settings->save(); KItemListStyleOption option = styleOption(); option.iconSize = size; @@ -49,4 +41,3 @@ int PlacesView::iconSize() const return option.iconSize; } -#include "placesview.moc"