Re: flicker with viewport and hbox
- From: Bert <bert ioniq co za>
- To: gtk-app-devel-list gnome org
- Subject: Re: flicker with viewport and hbox
- Date: Fri, 2 Jan 2009 04:36:27 +0200
On 02 Jan 2009, at 4:17 AM, Yu Feng wrote:
Hi,
I am not sure if I understand your scenario correctly.
Why don't you put the icons out of the viewport, aka:
VBOX
+ up indicator icon
+ Viewport
+ down indicator icon
in your key-press handler, you scroll the viewport, and show/hide the
icon.
I unfortunately don't have vertical space left, this is a 320x240
embedded application. However, your suggestion has triggered me into
thinking of doing the following:
HBOX
+ viewport
+ VBOX
++ up indicator
++ down indicator
and then show/hide the indicators as necessary, still keeping them out
of the viewport as per your suggestion.
Because the visibility of the icon rarely changes, the allocation of
the
Viewport is not changed very often. Neither will the allocation of the
widgets inside the viewport change.
The problem of your implementation, (perhaps) is that you add/remove
those indicator icons in every keypress event. The add/remove causes a
resize to be queued, thereafter every widget is redrawn, and flicker
occurs.
I believe you've hit the nail on the head with this last insight --
this (the queueing of the resize) is probably the crucial thing that I
had not realized, and explains why things were drawn twice.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]