[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request: Save scrollbar position on plasma exit
From: "Marco Martin" <notmart () gmail ! com>
Date: 2012-06-20 9:50:25
Message-ID: 20120620095025.29966.77869 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104258/#review14906
-----------------------------------------------------------
what is the status of this? has been pushed? is pretty old, should be either dropped \
or submitted but not left dangling
- Marco Martin
On March 16, 2012, 4:31 p.m., Ignat Semenov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104258/
> -----------------------------------------------------------
>
> (Updated March 16, 2012, 4:31 p.m.)
>
>
> Review request for Plasma, Aaron J. Seigo, Marco Martin, and Fredrik Höglund.
>
>
> Description
> -------
>
> This patch implements scrolbar position saving on plasma exit. The change is fairly \
> trivial, however, due to the fact that the view is not populated and layouted \
> immediately simply scrolling to the desired position on creating the view does not \
> work. Instead a signal is emitted on finishing the item layout, when the view has a \
> valid size and the scrollbar has a valid range. The signal is connected to a slot \
> which scrolls the view to the desired position and then disconnects the signal. For \
> the user, a public function in AbstractItemView is introduced, which performs the \
> connection.
> The only problem is that ListView turned out not to have any layout method. It just \
> paints the items one by one, calculating their position on the fly, so I put the \
> signal at the end of updateScrollbar to ensure the scrollbar range is valid. Maybe \
> it should go into the "if (max>0)" branch?
>
> This addresses bug 261139.
> http://bugs.kde.org/show_bug.cgi?id=261139
>
>
> Diffs
> -----
>
> plasma/applets/folderview/abstractitemview.h aa68b90
> plasma/applets/folderview/abstractitemview.cpp 3debb70
> plasma/applets/folderview/folderview.h 4e441eb
> plasma/applets/folderview/folderview.cpp a94ce87
> plasma/applets/folderview/iconview.h 12e93b3
> plasma/applets/folderview/iconview.cpp 5c4e086
> plasma/applets/folderview/listview.cpp 94efe44
>
> Diff: http://git.reviewboard.kde.org/r/104258/diff/
>
>
> Testing
> -------
>
> Tested both the icon view and the list view, works fine.
>
>
> Thanks,
>
> Ignat Semenov
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/104258/">http://git.reviewboard.kde.org/r/104258/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">what is the status of \
this? has been pushed? is pretty old, should be either dropped or submitted but not \
left dangling</pre> <br />
<p>- Marco</p>
<br />
<p>On March 16th, 2012, 4:31 p.m., Ignat Semenov wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma, Aaron J. Seigo, Marco Martin, and Fredrik \
Höglund.</div> <div>By Ignat Semenov.</div>
<p style="color: grey;"><i>Updated March 16, 2012, 4:31 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch implements scrolbar position saving on plasma exit. The \
change is fairly trivial, however, due to the fact that the view is not populated and \
layouted immediately simply scrolling to the desired position on creating the view \
does not work. Instead a signal is emitted on finishing the item layout, when the \
view has a valid size and the scrollbar has a valid range. The signal is connected to \
a slot which scrolls the view to the desired position and then disconnects the \
signal. For the user, a public function in AbstractItemView is introduced, which \
performs the connection.
The only problem is that ListView turned out not to have any layout method. It just \
paints the items one by one, calculating their position on the fly, so I put the \
signal at the end of updateScrollbar to ensure the scrollbar range is valid. Maybe it \
should go into the "if (max>0)" branch?</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tested both the icon view and the list view, works fine.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=261139">261139</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/applets/folderview/abstractitemview.h <span style="color: \
grey">(aa68b90)</span></li>
<li>plasma/applets/folderview/abstractitemview.cpp <span style="color: \
grey">(3debb70)</span></li>
<li>plasma/applets/folderview/folderview.h <span style="color: \
grey">(4e441eb)</span></li>
<li>plasma/applets/folderview/folderview.cpp <span style="color: \
grey">(a94ce87)</span></li>
<li>plasma/applets/folderview/iconview.h <span style="color: \
grey">(12e93b3)</span></li>
<li>plasma/applets/folderview/iconview.cpp <span style="color: \
grey">(5c4e086)</span></li>
<li>plasma/applets/folderview/listview.cpp <span style="color: \
grey">(94efe44)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104258/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic