Code review comment for lp:~tigrangab/granite/popover_fix

Revision history for this message
Tigran Gabrielyan (tigrangab) wrote :

Ok. So the way it was at first was "PopPosition pos = PopPosition.TOPRIGHT;"

Now inside of compute_pop_position it sets "var old_pos = pos;"
So old_pos is now set to TOPRIGHT.

At the end of compute_pop_position after it calculates the new position, it checks

if (old_pos != pos) {
     compute_shadow (get_allocated_width (), get_allocated_height ());
}

If the "pos" calculated is TOPRIGHT, compute_shadow won't be called since old_pos is set to TOPRIGHT initially and the old_pos = pos.

This causes the arrow to show bottom left position (arrow_up is default false and the offset isn't drawn to the right because compute_shadow isn't called).

« Back to merge proposal