just a cosmetic thingy :p
When a pixmapmenu goes offside screen horizontally (I usually put the
IM window on the left) it is displayed "mirrored" on the left... this
behaviour reminds me of a flag. I don't know how to explain it...
anyway it looks a bit weird to me, because usually "native" menus
don't calculate the new position in this way, they just decrease x by
the width of the part of menu which would otherwise go offscreen:
x_pos = menuwidth - (screenwidth-x_pos)
the patch just does this
also, if your window goes vertically offscreen (why would you do
that?? :D) menu is erroneously displayed under mouse cursor, which
leads to trigger the event corresponding the voice on which the mouse
is, even if you don't want. In this case the menu-as-a-flag behaviour
is what I would have expected, so I edited pixmapmenu consequently.
just a minor thing but I like it :p
bye
Index: pixmapmenu.tcl
===================================================================
--- pixmapmenu.tcl (revisione 7547)
+++ pixmapmenu.tcl (copia locale)
@@ -639,13 +639,20 @@
set x [expr {[winfo rootx $self] + [$self xposition $nindex]}]
set y [expr {[winfo rooty $self] + [winfo height $self]}]
# Make sure we post it in-screen
- if { [expr {$x + [$menu cget -width]}] > [winfo screenwidth $self] } {
+
+ # Edited not to show completely "reversed", but just in-screen as
+ # native menus usually do :) (NoWhereMan)
+
+ set screenw [winfo screenwidth $self]
+ set outofscreen [expr {$x + [$menu cget -width] - $screenw}]
+ if {$outofscreen > 0} {
incr x -[$menu cget -width]
- incr x [contentmanager width $main $entry]
+ set x [expr $screenw - $outofscreen] ;#[contentmanager width $main $entry
}
if { [expr {$y + [$menu cget -height]}] > [winfo screenheight $self] } {
incr y -[$menu cget -height]
- incr y [winfo height $self]
+ incr y -[winfo height $self] ;# typo? this should be decreased, or
+ # menu would appear over the mouse cursor :)
}
}
vertical {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel