GoogleCodeArchives / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

Too much space to the right of the text in PlateButtons on Linux/GTK #462

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call a wx.lib.platebtn.PlateButton under Linux/GTK.
2. Note that there is too much space to the right of the text.
3. The area that triggers a drop-arrow event is too far to the right of the
arrow.

What is the expected output? What do you see instead?
The expected output is for the text and arrow in the button to have a small
uniform area around them. Instead, I see plenty of space to the right of
the text. Also, the arrow click area is far removed from the actual arrow.

IMPORTANT!!! Please answer these questions for any and ALL bug reports

What version of the product are you using? On what operating system?
wx.version: 2.8.10.1 (gtk2-unicode)
python version: 2.6.4
The operating system is Arch Linux.

What method of install was your version installed with (Binary/Source)?
Binary (Arch package)

If from source: What version of python and wxPython are you using?
From Arch packages, python-2.6.4; wxpython-2.8.10.1 

Please provide any additional information below.
I only see this effect on my Linux system. The buttons look and behave fine
on Windows XP. The problem can be seen by running the PlateButton.py demo
from the wxPython-demo distribution. I am attaching a screenshot that shows
the problem on my Linux system. The mouse pointer in the image is where I
have to click to get the drop-arrow to work. Anything further to the left,
and closer to the arrow, does not fire the drop-arrow event.

Original issue reported on code.google.com by glen...@gmail.com on 19 Jan 2010 at 1:38

Attachments:

GoogleCodeExporter commented 9 years ago
* Note this was not an issue during previous testing on wxPython 2.8.7

Also update ctor signature to use standard id=-1 instead of id_=-1 so that 
factory
based constructors such as wxtag will work with the control.

Original comment by CodyPrec...@gmail.com on 19 Jan 2010 at 2:24

GoogleCodeExporter commented 9 years ago
Committed fix to 2.9 branch for the 'id_' vs 'id' issue. Decided not to make the
change on the 2.8 branch for compatibility reasons.

Original comment by CodyPrec...@gmail.com on 28 Jan 2010 at 12:27

GoogleCodeExporter commented 9 years ago
wxGTK seems to be returning the wrong metrics for measuring the text width.

Original comment by CodyPrec...@gmail.com on 2 Jun 2011 at 3:37

GoogleCodeExporter commented 9 years ago
Found the issue:

On GTK Window.GetTextExtent will return the text measurements using a regular 
DC's font metrics. However the button is drawn with a GCDC which uses a 
GraphicsContext to draw the text. The measurements for the text from the GC 
were much different than the DC due to antialiasing and such.

Corrected in editra svn - will push fix to wx.lib as well.

Original comment by CodyPrec...@gmail.com on 2 Jun 2011 at 3:50