http://bugs.winehq.org/show_bug.cgi?id=13955
Summary: owner-drawn combobox height different to windows Product: Wine Version: 1.0-rc5 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lightning_uk@imgburn.com
Created an attachment (id=14111) --> (http://bugs.winehq.org/attachment.cgi?id=14111) Screenshots
I make use of owner-drawn ComboBox's within my program (ImgBurn) and under Ubuntu (via Wine 1.0 rc5 - and all versions before it that I've tested) they're drawn too big and end up covering up the buttons below them.
It's only a matter of 2 or so pixels but it's enough to matter.
I've attached a zip containing a couple of PNG's.
1 from Windows (with 'Themes' disabled so it looks more like Ubuntu) showing the expected height of the box and another from Ubuntu 8.04/Wine where the combobox slightly overlaps the buttons below it.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #1 from Austin English austinenglish@gmail.com 2008-06-16 14:24:40 --- Could you upload a small testcase?
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #2 from LIGHTNING UK! lightning_uk@imgburn.com 2008-06-16 16:20:39 --- Created an attachment (id=14113) --> (http://bugs.winehq.org/attachment.cgi?id=14113) Testcase program
As requested, here's a small testcase program.
I'm sure you'll instantly notice that there is a visible gap of a few pixels between the combobox and the button on an XP system, under Ubuntu the two actually overlap.
http://bugs.winehq.org/show_bug.cgi?id=13955
shakaran shakaran@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |shakaran@gmail.com
--- Comment #3 from shakaran shakaran@gmail.com 2008-06-20 00:00:01 --- On the other hand, one can see that the background color (gray) does not appear the same.
http://bugs.winehq.org/show_bug.cgi?id=13955
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |trivial Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |download
--- Comment #4 from Austin English austinenglish@gmail.com 2008-06-21 19:54:22 --- Confirming. Mind attaching the source to that?
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #5 from LIGHTNING UK! lightning_uk@imgburn.com 2008-06-22 04:17:13 --- I would but there isn't any to speak of!
It's a CodeGear (Borland) C++ Builder program and all I did was drop a TComboBox and TButton onto the main form and then set the ComboBox 'Style' to 'csOwnerDrawFixed'.
C++ Builder handles all the code behind control creation and the user never sees it.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #6 from Austin English austinenglish@gmail.com 2008-12-26 17:49:08 --- Still present in git.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #7 from LIGHTNING UK! lightning_uk@imgburn.com 2009-02-03 17:51:39 --- Still present in 1.1.14.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #8 from LIGHTNING UK! lightning_uk@imgburn.com 2009-03-12 13:24:05 --- Still present in 1.1.16.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #9 from LIGHTNING UK! lightning_uk@imgburn.com 2009-08-26 05:13:53 --- Still present in 1.1.28.
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #10 from LIGHTNING UK! lightning_uk@imgburn.com 2009-12-29 08:23:43 --- Still present in 1.1.35
http://bugs.winehq.org/show_bug.cgi?id=13955
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com 2009-12-29 08:28:32 --- Attach a C++Builder source please. There's no problem for not-ownerdrawn combos?
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #12 from LIGHTNING UK! lightning_uk@imgburn.com 2009-12-29 09:54:33 --- Like I said in comment 5, there's no source code to speak ok (or at least I haven't written a single line of it).
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #13 from LIGHTNING UK! lightning_uk@imgburn.com 2011-06-27 06:42:07 CDT --- The problem here is in dlls/user32/combo.c
In the function 'CBGetTextAreaHeight' there are 2 lines that need changing.
measureItem.itemHeight = iTextItemHeight - 6; /* ownerdrawn cb is taller */ . . . iTextItemHeight = 6 + measureItem.itemHeight;
I don't see any point in the first '6' at all and adding '6' to the measured item height makes the box too tall.
It would match Windows exactly if those lines said...
measureItem.itemHeight = iTextItemHeight; . . . iTextItemHeight = 2 + measureItem.itemHeight; /* ownerdrawn cb is taller */
http://bugs.winehq.org/show_bug.cgi?id=13955
--- Comment #14 from François Gouget fgouget@codeweavers.com 2013-06-04 05:15:17 CDT --- Created attachment 44656 --> http://bugs.winehq.org/attachment.cgi?id=44656 Patch described in comment #13
I turned the instructions in comment #13 into a proper patch. It does not mean I endorse it in any way as I don't know this part of the code. But hopefully it will make reviews easier.
http://bugs.winehq.org/show_bug.cgi?id=13955
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |fgouget@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=13955
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #15 from winetest@luukku.com --- (In reply to François Gouget from comment #14)
Created attachment 44656 [details] Patch described in comment #13
I turned the instructions in comment #13 into a proper patch. It does not mean I endorse it in any way as I don't know this part of the code. But hopefully it will make reviews easier.
The patch merges cleanly against 1.9.23.
https://bugs.winehq.org/show_bug.cgi?id=13955
rebe@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rebe@gmx.net
--- Comment #16 from rebe@gmx.net --- The issue is not fixed as of wine 3.0-RC2. Does the patch still apply? Why don't you submit it?
https://bugs.winehq.org/show_bug.cgi?id=13955
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #17 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with current wine(4.0-rc1)?