Summary: | KConfigDialog::addPage() requires hardcoded icon sizes | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Lukas Sommer <sommerluk> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | pino |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Lukas Sommer
2011-05-20 13:56:48 UTC
(In reply to comment #0) > KConfigDialog::addPage() only accepts "const QString &pixmapName" to determine > the icon that is displayed. To use a simple standard icon, you have to so > something like > > KIconLoader iconloader; > addPage(new settings_general_widget_saving(this), > i18nc("@title of a page in the configuration dialog", "Saving"), > iconloader.iconPath("document-save", KIconLoader::SizeEnormous * > (-1))); No that's wrong, "pixmapName" means the name of an icon in the current icon theme. Just one example of the okular sources: addPage( m_general, i18n("General"), "okular", i18n("General Options") ); (Oh, and a side note: creating a new KIconLoader is not the best idea, just use the global one you have at KIconLoader::global().) Shame on me. I didn't even notice that it was possible to pass just the icon name. (I've yet changed the corresponding code in KStreamRipper, the program from which was taken the code example.) I've made a patch that fixes the documentation: http://git.reviewboard.kde.org/r/101409/ Closing as INVALID because the requested behaviour exists yet. |