Summary: | display in main window not refreshed when scrollbar disappears | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | Amit Shah <amitshah> |
Component: | Main Application | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Amit Shah
2003-11-27 06:03:36 UTC
Subject: Re: [Kopete-devel] New: display in main window not refreshed when scrollbar disappears
On November 27, 2003 1:03 am, Amit Shah wrote:
> 4. Scroll to the top of the window so that you see the online contacts and
> some offline contacts, make sure to resize the window height so that you
> get a vertical scroll bar
5. Fold the offline contacts folder, so that the
> scroll bar vanishes 6. Contacts which have big names (almost span till the
> horizontal width of the window) are garbled.
You guys think this is a KListView bug or is it due to our custom widget
painting not being refreshed?
Subject: Re: [Kopete-devel] display in main window not refreshed when scrollbar disappears
On Thursday 27 November 2003 13:36, Jason Keirstead wrote:
> You guys think this is a KListView bug or is it due to our custom widget
> painting not being refreshed?
Both are possible. One would need to dive deep in the Qt sources to figure out
the order of events here, and I'm not sure Qt is at fault.
BTW, there's also the possibility that QScrollView is wrong here, which is the
list view's base class.
Subject: Re: [Kopete-devel] display in main window not refreshed when scrollbar disappears
On Thursday 27 November 2003 12:36, Jason Keirstead wrote:
> You guys think this is a KListView bug or is it due to our custom widget
> painting not being refreshed?
I'd say it's our painting. Maybe our use of the KSqueezedTextLabel that draws
squished MC names is wrong somewhere.
The list is being redrawn when the offline contacts are folded at 5. because
the contact icons are drawn in the correct position for the full width of the
list where the scrollbar used to be, and I can see part of the wider MC names
adjacent to the contact icons, but the narrower MC name used when the
scrollbar is present is drawn on top.
Will
Another way to reproduce it is to show/hide offline user, seems to be a QT bug, because the KopeteMetaContactLVI::painCell IS called, but only a part of the cell is drawn by QT. (maybe we should tell QT that it needs to redraw the whole cell, and not only the new showed part) Subject: Re: [Kopete-devel] display in main window not refreshed when scrollbar disappears On Thursday 27 November 2003 14:41, Olivier Goffart wrote: > seems to be a QT bug, because the KopeteMetaContactLVI::painCell IS called, > but only a part of the cell is drawn by QT. That's not a bug, it's an optimization :) > (maybe we should tell QT that it needs to redraw the whole cell, and not > only the new showed part) Yes, it's a Kopete bug then. We should explicitly tell the listview to do a full repaint when the view port's size changes. Now if I only knew which signal is the most appropriate for that... I can't reproduce this bug in current CVS. Has it been fixed? > I can't reproduce this bug in current CVS. Has it been fixed?
What version of QT are you using ?
(i still can reproduce it, it's with QT 3.2.x)
no, it hasn't been fixed, and i looked into this a bit more, and it's definately a QT problem, but i'm not sure how to fix it yet. or, could we call QListView::triggerUpdate() at the end of our drawing code? From the QListView constructor's documentation: Performance is boosted by modifying the widget flags f so that only part of the QListViewItem children is redrawn. This may be unsuitable for custom QListViewItem classes, in which case WStaticContents and WNoAutoErase should be cleared. I've tried that. It doesn't seem to make any difference. Got a fix here. CVS commit by lilachaze: Make sure listview items aren't mispainted when the scrollbar appears / disappears. Work around a Qt bug preventing same. CCMAIL: 69121@bugs.kde.org M +8 -0 kopetecontactlistview.cpp 1.73 --- kdenetwork/kopete/kopete/contactlist/kopetecontactlistview.cpp #1.72:1.73 @@ -309,4 +309,12 @@ KopeteContactListView::KopeteContactList setDropHighlighter( true ); setSelectionMode( QListView::Extended ); + + clearWFlags( WStaticContents | WNoAutoErase ); + + // clear the appropriate flags from the viewport - qt docs say we have to mask + // these flags out of the QListView to make weirdly painted list items work, but + // that doesn't do the job. this does. + class MyWidget : public QWidget { public: QWidget::clearWFlags; }; + static_cast<MyWidget*>( viewport() )->clearWFlags( WStaticContents | WNoAutoErase ); } CVS commit by lilachaze: Make sure listview items aren't mispainted when the scrollbar appears / disappears. Work around a Qt bug preventing same. [BACKPORT] CCMAIL: 69121-done@bugs.kde.org M +8 -0 kopetecontactlistview.cpp 1.63.2.3 --- kdenetwork/kopete/kopete/contactlist/kopetecontactlistview.cpp #1.63.2.2:1.63.2.3 @@ -285,4 +285,12 @@ KopeteContactListView::KopeteContactList setDropHighlighter( true ); setSelectionMode( QListView::Extended ); + + clearWFlags( WStaticContents | WNoAutoErase ); + + // clear the appropriate flags from the viewport - qt docs say we have to mask + // these flags out of the QListView to make weirdly painted list items work, but + // that doesn't do the job. this does. + class MyWidget : public QWidget { public: QWidget::clearWFlags; }; + static_cast<MyWidget*>( viewport() )->clearWFlags( WStaticContents | WNoAutoErase ); } |