|
Fuego Ledrey Wanderer
Joined: 09 May 2007 Posts: 64 Location: Dustin Acres, California
|
Posted: Tue Jun 26, 2007 1:51 am
Button ellipses. |
I know it's a known bug, but here is the reason for the post.
Until 5 minutes ago, I was playing a MUD with v1.33 and everything worked fine, I hadn't noticed this bug before. I signed onto the forums again and noticed that v1.34 was out, so I closed CMUD, opened it again to get the upgrade and proceeded to upgrade. Now, for some reason, my buttons are ellipsing. Weird, as it worked for me in v1.33 5 minutes ago. Nothing changed besides upgrading. So I played around with it for a little bit, and got some weird results. Here's what the button is supposed to look like, screenshot taken a couple days ago, v1.33 just to clearify:
Here is the screenshot from directly after I installed v1.34 and opened up CMUD again:
Then, as I said, I played around with it. I changed the text in the button to read "Fu". Obviously I expected this to be short enough, I was yet again, surprised to see this:
As you can see, it appears as though the font changed, and, of course, the ellipses are showing up with adequate space. Thoughts? |
|
|
|
Fuego Ledrey Wanderer
Joined: 09 May 2007 Posts: 64 Location: Dustin Acres, California
|
Posted: Tue Jun 26, 2007 2:00 am |
NOTE: I read an earlier post by Zugg and checked to make sure my dpi is 96, it was and still is.
NOTE: I have Windows Vista Home Premium. Another other specs you might want/need? |
|
_________________ EDIT: Image moved to Avatar FINALLY. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 26, 2007 4:12 am |
I have no idea how just recompiling this with the un-corrupted compiler would make any difference. But if it helps, I reproduced this problem last week and it's already on the bug list. My test case looks just as bad as it did last week, so I'm not sure 1.34 is really any different. But there is definitely a bug and it's a weird one because changing the button size, font, etc don't seem to have any effect on it. It's almost like the button stopped using the proper bounds rectangle to calculate the ellipses.
In any case, since I have already reproduced it, I don't need any other information...it should be easy to fix for the July edition.
Don't get your hopes up for any "quick fix". There are lots of bugs that I'm fixing this month, and this is just one of many. The only reason I released 1.34 was to make sure that the bug reports and crash dumps that I was getting were not from a corrupted compiler. I didn't mean to get anyone's hopes up for a long line of quick bug fixes right now. |
|
|
|
Fuego Ledrey Wanderer
Joined: 09 May 2007 Posts: 64 Location: Dustin Acres, California
|
Posted: Tue Jun 26, 2007 4:25 am |
Thank you for responding, it's much appreciated. I'm not too sure why it happened on the upgrade to 1.34 either, I was hoping you could tell me, heh. Thanks for all your hard work, keep it up.
|
|
_________________ EDIT: Image moved to Avatar FINALLY. |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Tue Jun 26, 2007 11:53 am |
I also noticed it when I upgraded to 1.34, definitely wasn't happening in 1.33
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Harlequ1n Newbie
Joined: 24 May 2007 Posts: 5
|
Posted: Tue Jun 26, 2007 1:46 pm |
Same is happening to me.
It doesn't seem to occur unless variables are used in the button name, in my instance.
EDIT: To be precise, if I use an %if statement, and it tries to display something like @amwielding, it'll do the ellipse thing. If it doesn't try to display the variable and instead a string, "Nothing", in this case, then it displays fine. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 26, 2007 4:53 pm |
Actually, in my test case I don't use any variables and I still see the problem.
I guess if the corrupted compiler could cause an obscure error when opening the mapper, it could also have caused some code to mask this particular bug too. From what I can tell, the corrupted compiler was actually compiling the code ok, but was corrupting something in the linking phase and linking wrong versions of libraries together (and not rebuilding some library files).
If the button caption problem is theme related, then it's possible the 1.33 version wasn't linked with the proper button library and that the correct library had this bug in it that I hadn't seen when using the IDE compiler.
I'm still waiting to hear (in another thread) if the other theme-related issue with backspacing in edit boxes is fixed or not. That might also help me determine which library was/is messed up. |
|
Last edited by Zugg on Tue Jun 26, 2007 4:56 pm; edited 1 time in total |
|
|
|
Fuego Ledrey Wanderer
Joined: 09 May 2007 Posts: 64 Location: Dustin Acres, California
|
Posted: Tue Jun 26, 2007 4:55 pm |
I see the problem with and without variables.
|
|
_________________ EDIT: Image moved to Avatar FINALLY. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 26, 2007 5:31 pm |
Ahh, ok, I found out why it changed in 1.33->1.34. I had modified my button component when I was working on zExplorer last month to reduce some flickering problems. I changed the button to buffer its drawing to a bitmap image, which is then drawn on the screen.
Apparently, the Windows API call DrawTextEx with the DT_END_ELLIPSIS flag isn't working properly with this bitmap canvas. I'm looking into why this isn't working, but at least now I understand how it could change with this recompile. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 26, 2007 5:40 pm |
Found the problem. There were two calls to DrawTextEx...one to compute the text rectangle, and one to draw the text. The first call to compute the text rectangle was in a helper function that was always using the canvas handle (HDC) of the button control itself, instead of using the intermediate bitmap handle used for double-buffering. I changed the helper function to accept a different canvas handle argument and passed it the bitmap and now it works on the new version here.
I don't really want to release a whole new version just for this, but if I release any other intermediate versions before the big 2.0 release, then you'll get this fix. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 26, 2007 5:58 pm |
OK, I changed my mind. I think I found the problem causing the editbox corruption, so I'm releasing a new version of 1.34. This version will also have the button ellipses problem fixed.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Tue Jun 26, 2007 6:32 pm |
Sweet, when I installed the first 1.34 it GAVE me the ellipses. I did tests to see what letters caused it was about to post them and tell people to write in caps and when I log in you have the issue fixed!
Installed the new 1.34 and it fixed them.
Cheers Zugg |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Tue Jun 26, 2007 7:38 pm |
That's good work Zugg.
I loved the ongoing updates and the big clinch for the solution.
Very exciting stuff :p |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
Fuego Ledrey Wanderer
Joined: 09 May 2007 Posts: 64 Location: Dustin Acres, California
|
Posted: Tue Jun 26, 2007 7:40 pm |
Just downloaded the NEW v1.34 and it did indeed fix the button ellipses, go you!
|
|
_________________ EDIT: Image moved to Avatar FINALLY. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Mon Jul 16, 2007 2:18 am |
Sorry to say this but I was checking on the button text refresh issue posted a bit ago and I found that this problem had reared its ugly head again.
In that example I created a toggle button. The name of the first state was x the name of the second state was y.
Save the button and click it. The x displays correctly the y has the ellipsis... |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 16, 2007 2:49 am |
Sorry Arminas, but I can't reproduce any problem with this now. I just followed your instructions and it worked fine here.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Mon Jul 16, 2007 1:04 pm |
Hrm... Looks like I still have the old 1.34 at home. Apologies, I am usually on the forums at work these days I'll make certain to update my computer at home and try again.
It worked fine for me at work so. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|