Bug 100781

Summary: Preview in Theme manager should not be scaled
Product: kcontrol Reporter: Malte S. Stretz <mss>
Component: kthememanagerAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Malte S. Stretz 2005-03-04 01:18:56 UTC
Version:           0.4 (using KDE 3.4.0, Gentoo)
Compiler:          gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.10-gentoo-r4

On my 1280x1024 screen with a maximized KControl, the preview in the Theme Manager looks ugly as hell because it is scaled up to a size where everything is just blurred.

The preview should not be scaled, or only scaled down if the window is too small, but never up.
Comment 1 Stephan Binner 2005-04-04 23:52:34 UTC
I agree. But as it seems to be added intentionally (kthememanager.cpp#392) let's hear what Lukas says against removing the scaling.
Comment 2 Stephan Binner 2005-04-05 17:43:48 UTC
CVS commit by binner: 

Don't scale up preview (#100781)
BUG:100781


  M +3 -1      kthememanager.cpp   1.21.2.1


--- kdebase/kcontrol/kthememanager/kthememanager.cpp  #1.21:1.21.2.1
@@ -390,4 +390,6 @@ void kthememanager::updatePreview( const
      kdDebug() << "Preview is in file: " << pixFile << endl;
      QImage preview( pixFile, "PNG" );
+     if (preview.width()>dlg->lbPreview->contentsRect().width() ||
+         preview.height()>dlg->lbPreview->contentsRect().height() )
      preview = preview.smoothScale( dlg->lbPreview->contentsRect().size(), QImage::ScaleMin );
      QPixmap pix;