diff options
| author | Frank Reininghaus <[email protected]> | 2012-09-27 08:11:53 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2012-09-27 08:12:02 +0200 |
| commit | 831251d0f3bd960449e31d7a82baec1bba131e15 (patch) | |
| tree | 4a5fa53a1c97a9c39e91ec0e126f53dff218151f /src/panels/places/placesview.cpp | |
| parent | 63561edb4598035e8631575dbc19d0581e85823a (diff) | |
Add a new config option for the icon size in the Places Panel
To change the icon size in the Places Panel to, e.g., 60 pixels, add
the following lines to $KDEHOME/share/config/dolphinrc :
[PlacesPanel]
IconSize=60
A value of -1 means that the standard "Small" size should be used
(which has been the default before this commit).
It is planned to add an "Icon Size" submenu to the context menu of the
Places Panel in KDE 4.10, but we cannot do this in the 4.9 branch
because of the string freeze.
FIXED-IN: 4.9.2
BUG: 301959
Diffstat (limited to 'src/panels/places/placesview.cpp')
| -rw-r--r-- | src/panels/places/placesview.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/panels/places/placesview.cpp b/src/panels/places/placesview.cpp new file mode 100644 index 000000000..dce5083d7 --- /dev/null +++ b/src/panels/places/placesview.cpp @@ -0,0 +1,35 @@ +/*************************************************************************** + * Copyright (C) 2012 by Frank Reininghaus <[email protected]> * + * * + * 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 * + ***************************************************************************/ + +#include "placesview.h" + +#include "dolphin_placespanelsettings.h" + +PlacesView::PlacesView(QGraphicsWidget* parent) : + KStandardItemListView(parent) +{ + const int iconSize = PlacesPanelSettings::iconSize(); + if (iconSize >= 0) { + KItemListStyleOption option = styleOption(); + option.iconSize = iconSize; + setStyleOption(option); + } +} + +#include "placesview.moc" |
