[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Monitor preview image (Was: KDE 3.4 Control Center UI Review)
From:       Waldo Bastian <bastian () kde ! org>
Date:       2005-02-14 12:19:29
Message-ID: 200502141319.33520.bastian () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On Sunday 13 February 2005 18:31, Waldo Bastian wrote:
> - The preview Monitor which is consistently used throughout various modules
> needs some minor adjustments
[Snip]
> Background
> - Preview Monitor has ugly border around background image before the border
> of the monitor itself starts.

I think the new picture for the monitor used with the background preview 
doesn't entirely work as-is. This border looks weird. I tried to come up with 
a borderless version. This is a bit of a challenge because the code pretty 
much likes the actual preview to be square but the monitor really looks 
better with round edges. 
 
I halfway managed to fix the problem for the background dialog, the panel 
dialog shouldn't be a problem either, but the monitor is also used for the 
screensaver configuration dialog and this is a problem because the 
screensavers themselves draw directly in the (square) window. 

Before: http://www.svn.net/bastian/kde/kcmbackground2.png
After: http://www.svn.net/bastian/kde/kcmbackground1.png

Attached: draft patch for background module, new image with transparant screen 
area

Problem: how to get the round borders in the screensaver configuration dialog

Cheers,
Waldo
-- 
bastian@kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian@suse.com  |   http://www.novell.com/products/desktop/eval.html

["kcmbackground_monitor.patch" (text/x-diff)]

Index: bgdialog.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/background/bgdialog.cpp,v
retrieving revision 1.62
diff -u -p -r1.62 bgdialog.cpp
--- bgdialog.cpp	12 Feb 2005 08:49:15 -0000	1.62
+++ bgdialog.cpp	14 Feb 2005 12:15:47 -0000
@@ -83,7 +83,7 @@ BGDialog::BGDialog(QWidget* parent, KCon
    m_monitorImage->setPixmap( QPixmap( locate("data",  "kcontrol/pics/monitor.png") \
) );  m_monitorImage->setFixedSize(m_monitorImage->sizeHint());
    m_pMonitor = new BGMonitor(m_monitorImage, "preview monitor");
-   m_pMonitor->setGeometry(23, 14, 151, 115);
+   m_pMonitor->setGeometry(9, 7, 180, 129);
    connect(m_pMonitor, SIGNAL(imageDropped(const QString &)), \
SLOT(slotImageDropped(const QString &)));  if( m_multidesktop)
      {
@@ -667,6 +667,13 @@ void BGDialog::slotPreviewDone(int desk_
    else
       pm.convertFromImage(*r->image());
 
+   QPainter p(&pm);
+   p.drawPixmap(0,0, *(m_monitorImage->pixmap()), m_pMonitor->x(), m_pMonitor->y(), \
5, 5); +   p.drawPixmap(m_pMonitor->width()-5,0, *(m_monitorImage->pixmap()), \
m_pMonitor->x()+m_pMonitor->width()-5, m_pMonitor->y(), 5, 5); +   \
p.drawPixmap(0,m_pMonitor->height()-5, *(m_monitorImage->pixmap()), m_pMonitor->x(), \
m_pMonitor->y()+m_pMonitor->height()-5, 5, 5); +   \
p.drawPixmap(m_pMonitor->width()-5,m_pMonitor->height()-5, \
*(m_monitorImage->pixmap()), m_pMonitor->x()+m_pMonitor->width()-5, \
m_pMonitor->y()+m_pMonitor->height()-5, 5, 5); +   p.end();
+
    m_pMonitor->setBackgroundPixmap(pm);
 }
 


["monitor.png" (image/png)]
[Attachment #7 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic