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

List:       kde-devel
Subject:    Icon positioning on desktop - bug?
From:       Krzysztof Lichota <krzysiek () lichota ! net>
Date:       2007-07-11 17:56:16
Message-ID: 469519C0.4080804 () lichota ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


I have spotted the following code in kdebase/kdesktop/kdiconview.cc file
(3.5 branch), in function KDIconView::readIconPosition()
110     {
111       // problem here: when reading a position before we know the
correct
112       // desktopIconsArea, the relative position do not make sense
113       // workaround: use desktopRect() as the allowed size
114
115       QRect desk = desktopRect();
116       QString X_w = QString("X %1").arg(desk.width() );
117       QString Y_h = QString("Y %1").arg(desk.height());
118
119       x = config->readNumEntry(X_w, -99999);
120       if ( x != -99999 ) x = config->readNumEntry("X");
121       if ( x < 0 ) x += desk.width();
122
123       y = config->readNumEntry(Y_h, -99999);
124       if ( y != -99999 ) y = config->readNumEntry("Y");
125       if ( y < 0 ) y += desk.height();
126     }

For me it does not make sense - first it tries to read "X %width" (for
example "X 1024" and if it _succeeds_ (line 120) it throws it away and
tries to read "X", then uses it. The condition should be: if ( x == -99999 )

Or am I missing something? If it is not a bug, how is it possible to say
that icon should be 100 pixels away from right side of the desktop, for
any resolution?

Cheers

	Krzysztof Lichota


["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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