diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-13 11:53:38 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-13 11:53:38 -0400 |
commit | 9aa35401ade8779dddd63dd8726c2755a751d047 (patch) | |
tree | c4a68a474d5628416cefac36d77762c808b7d6e0 /lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | |
parent | Re-enable the option to go to an eternally-mounted device directory (Looks li... (diff) | |
download | lumina-9aa35401ade8779dddd63dd8726c2755a751d047.tar.gz lumina-9aa35401ade8779dddd63dd8726c2755a751d047.tar.bz2 lumina-9aa35401ade8779dddd63dd8726c2755a751d047.zip |
A bit more cleanup of the new desktop icons:
1) Adjust the font outlines quite a bit more - now it properly respects the theme settings and adjusts appropriately.
2) Add options to re-size all the desktop icons at the same time (use 16 pixel increments)
3) Adjust the default desktop icon size (use a 64x64 icon be default).
4) Ensure that the applauncher re-scales the icon as necessary to ensure it is the proper size.
Diffstat (limited to 'lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp')
-rw-r--r-- | lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp index cf7f84d4..f2fd2206 100644 --- a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp @@ -34,7 +34,7 @@ AppLauncherPlugin::AppLauncherPlugin(QWidget* parent, QString ID) : LDPlugin(par //QSize sz(qRound(1.1*icosize), icosize+qRound(2.7*button->fontMetrics().height()) ); //button->setFixedSize(sz); //make sure to adjust the button on first show. this->setInitialSize(120, 100); //give the container a bit of a buffer - QTimer::singleShot(100,this, SLOT(loadButton()) ); + QTimer::singleShot(200,this, SLOT(loadButton()) ); } void AppLauncherPlugin::Cleanup(){ @@ -89,6 +89,12 @@ void AppLauncherPlugin::loadButton(){ } //Now adjust the visible text as necessary based on font/grid sizing button->setToolTip(txt); + //Double check that the visual icon size matches the requested size - otherwise upscale the icon + if(button->icon().actualSize(button->iconSize()) != button->iconSize()){ + QIcon ico = button->icon(); + ico.addPixmap( ico.pixmap(button->iconSize()).scaled(button->iconSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); + button->setIcon(ico); + } //int icosize = this->readSetting("iconsize",64).toInt(); //int bwid = qRound(1.1*icosize); //this->setFixedSize(bwid, icosize+qRound(2.5*button->fontMetrics().height()) ); //make sure to adjust the button on first show. |