On Sun, May 23, 2010 at 10:28:00AM -0700, Chani wrote: > one of the bug reports mentioned that KDE's default icon size should be > respected, although it's not clear whether that was implemented.
It wasn't. > if that setting is not followed, then you have found a bug, and patches > are welcome. :) OK, attached are three fairly trivial patches. The first patch, against kdebase-runtime (both Debian 4.4.3-2 and KDE 4.5 SVN trunk) reenables the ability to change the "Panel" icon size in kcm_icons. It also disables the "Animate Icons" checkbox as that checkbox is disabled for most of the other icon types, and appers to be obsolete in KDE 4. The second and third patches do the same thing, but the second applies to Debian 4.4.3-2 while the third applies to KDE 4.5 SVN trunk. Both patches, against kdelibs, changes IconWidget::sizeHint to return IconSize(KIconLoader::Panel) instead of KIconLoader::SizeMedium when no preferred icon size has already been set (4.5 only). Note that KIconLoader::Panel defaults to KIconLoader::SizeMedium, so there's no change unless someone modifies the setting in the Appearance dialog. I've tested the first two patches against Debian 4.4.3-2 and they resolve the problem, allowing the user to configure the capped panel icon size. plasma-desktop has to be restarted for a new capped icon size to take effect, since IconWidget::sizeHint is only queried on applet initialization. The effect is also immediate (without plasma-desktop restart) on any new applet added to the panel. I've not tested the patches against KDE SVN trunk, I've just ensured they apply cleanly. Unfortunately I'm not setup to build and test trunk right now, if someone else can try these patches that would be great. If you do a partial build, the modified output files are kcm_icons.so and libplasma.so.3.0.0. So actually, I haven't confirmed that the icon size cap problem exists in KDE 4.5. I suspect it does, since it's definitely not user configurable right now. It looks like a bunch of code was added to IconWidget::sizeHint to allow individual applets to set a preferred icon size. However the "icon" and "kickoff" applets appear not to touch this. Are the first two patches fair game for KDE 4.4.4? I'd really love to see a user configurable panel icon size in Debian for accesibility purposes, and 4.5 is going to hit too late for squeeze. I'm assuming the first and third patches are appropriate for KDE 4.5. Again, they're fairly trivial, but need to be tested. Thanks everyone!
diff --git a/kcontrol/icons/icons.cpp b/kcontrol/icons/icons.cpp --- a/kcontrol/icons/icons.cpp +++ b/kcontrol/icons/icons.cpp @@ -409,10 +409,10 @@ return; mUsage = index; - if ( mUsage == KIconLoader::Panel || mUsage == KIconLoader::LastGroup ) + if ( mUsage == KIconLoader::LastGroup ) { mpSizeBox->setEnabled(false); - mpAnimatedCheck->setEnabled( mUsage == KIconLoader::Panel ); + mpAnimatedCheck->setEnabled(false); } else {
diff --git a/plasma/widgets/iconwidget.cpp b/plasma/widgets/iconwidget.cpp --- a/plasma/widgets/iconwidget.cpp +++ b/plasma/widgets/iconwidget.cpp @@ -604,7 +604,7 @@ QSizeF IconWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const { if (which == Qt::PreferredSize) { - return sizeFromIconSize(KIconLoader::SizeMedium); + return sizeFromIconSize(IconSize(KIconLoader::Panel)); } else if (which == Qt::MinimumSize) { return sizeFromIconSize(KIconLoader::SizeSmall); } else {
diff --git a/plasma/widgets/iconwidget.cpp b/plasma/widgets/iconwidget.cpp --- a/plasma/widgets/iconwidget.cpp +++ b/plasma/widgets/iconwidget.cpp @@ -674,7 +674,7 @@ if (d->preferredIconSize.isValid()) { return sizeFromIconSize(qMax(d->preferredIconSize.height(), d->preferredIconSize.height())); } - int iconSize = KIconLoader::SizeMedium; + int iconSize = IconSize(KIconLoader::Panel); if (d->iconSvg) { QSizeF oldSize = d->iconSvg->size(); d->iconSvg->resize();
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel