[PATCH 0/1] MR9328: dlls/sane.ds: Make comboboxes in property sheet high enough to properly drop down
When the sane.ds TWAIN data source displays it's user interface, it auto-generates a proprties dialog from the sane options for the current scanner. Oftenly this dialog contains windows ComboBox controls to choose between scan modes (gray / color) or resolutions. The ComboBox controls created are too flat to properly drop down, they only open about half a line height. This is difficult to use. This patch makes the control about 10 times the height of a string. The combox will not occupy more height than the elements that are filled in anyway. Behaviour before the patch: {width=305 height=244} Behaviour after the patch: {width=308 height=246} -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9328
From: Bernd Herd <codeberg(a)herdsoft.com> --- dlls/sane.ds/ui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c index 25a1cf33970..a8a0e13c760 100644 --- a/dlls/sane.ds/ui.c +++ b/dlls/sane.ds/ui.c @@ -281,6 +281,10 @@ static int create_item(HDC hdc, const struct option_descriptor *opt, tpl->cx = ctl_cx; } + if (class == 0x0085 && 0!=(styles & CBS_DROPDOWNLIST)) + { /* Drop-Down ComboBox */ + tpl->cy *= 10; + } ptr = (WORD *)(tpl + 1); *ptr++ = 0xffff; *ptr++ = class; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9328
Esme Povirk (@madewokherd) commented about dlls/sane.ds/ui.c:
tpl->cx = ctl_cx; } + if (class == 0x0085 && 0!=(styles & CBS_DROPDOWNLIST))
This way of checking a flag confuses me. I'd be OK with `(var & FLAG) != 0`, `!!(var & FLAG)`, or even just `(var & FLAG)`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9328#note_120357
participants (3)
-
Bernd Herd -
Bernd Herd (@herdsoft) -
Esme Povirk (@madewokherd)