Commit Graph

4464 Commits

Author SHA1 Message Date
Akihiro Sagawa 7f5f590d27 comctl32/edit: Implement WM_SETFONT margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Akihiro Sagawa 640c92b807 comctl32/tests: Use calculated WM_SETFONT margins in the CJK case.
In comctl32, ANSI version control also uses GetCharABCWidthsW().

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Akihiro Sagawa ef94a9fc6c comctl32/edit: Implement EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:25:00 +02:00
Akihiro Sagawa 28400eff29 comctl32/tests: Use calculated EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:57 +02:00
Akihiro Sagawa 95f7ad03e3 comctl32/tests: Tests default margin size with various font face and charset.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:54 +02:00
Akihiro Sagawa 5012c1b18b comctl32/tests: Add Unicode version tests for Edit control margins.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:49 +02:00
Akihiro Sagawa 21dcb1ec87 comctl32/tests: Move the default margin size tests into a separate function.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:44 +02:00
Akihiro Sagawa 05864617bb comctl32/edit: Fix minimum control size conditions when using EC_USEFONTINFO.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa 81c30446d9 comctl32/tests: Use EM_SETMARGINS to test EC_USEFONTINFO margins.
Tests assume that WM_SETFONT margins are equal to EM_SETMARGINS with
EC_USEFONTINFO ones. This isn't true when font's charset is CJK.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa a0e6d45519 comctl32/tests: Skip margin tests if a font for the target charset isn't available.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa 48d86f8931 comctl32/tests: Use GREEK_CHARSET in margin tests to avoid Associated Charset feature.
Due to Associated Charset feature, we currently use Chinese typeface in the
test in zh_CN locale. For consistency with another locale, we should avoid
the fature in tests.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Nikolay Sivov a058c72b0a comctl32/button: Improve repainting on WM_SETFOCUS.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Gabriel Ivăncescu 475f219738 comctl32/tests: Test for BCM_GETIDEALSIZE on command links with notes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu b15859d871 comctl32/button: Implement BCM_GETIDEALSIZE for command links.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu 7316f69389 comctl32/button: Implement themed command links.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu 9fee8a7d25 comctl32/button: Implement command links.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu 4fa7aa29b5 comctl32/button: Move the drawing of the button's image into a separate function.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu d89facbc50 comctl32/button: Preserve BST_HOT when mouse button is released.
This fixes button state when it is released and the mouse is still
hot-tracking it.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Gabriel Ivăncescu 83503d04d4 comctl32/tests: Avoid leaks by moving creation calls outside the loop.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:27 +02:00
Gabriel Ivăncescu 8ee1e3453e comctl32/button: Use WM_GETTEXTLENGTH to see if the button has any text.
There's no reason to allocate and then parse the entire string just to see
if its length is zero.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:27:23 +02:00
Gabriel Ivăncescu 715065feb3 comctl32/button: Delay calling get_button_text until it is needed to prevent a leak.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:27:19 +02:00
Gabriel Ivăncescu e41cb8e994 comctl32/tests: Also test for split buttons when testing BCM_GETIDEALSIZE.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu 9c62f7e42b comctl32/button: Implement BCM_GETIDEALSIZE for split buttons.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu 09bdf5d07d comctl32/tests: Add tests for BCN_DROPDOWN notification.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu 6fbb64fe67 comctl32/button: Implement themed split buttons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20123
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu ee2f71d8f6 comctl32/button: Implement split buttons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20123
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu ae4d8e1838 comctl32/tests: Add tests for BCM_SETSPLITINFO and BCM_GETSPLITINFO.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 16:58:59 +02:00
Gabriel Ivăncescu 4e08a7e5d7 comctl32/button: Implement BCM_GETSPLITINFO.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Gabriel Ivăncescu 82d39e1817 comctl32/button: Implement BCM_SETSPLITINFO.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Gabriel Ivăncescu 202a1c1ef0 comctl32/button: Implement BCM_SETDROPDOWNSTATE.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Gabriel Ivăncescu 725d3ff9f3 comctl32/button: Center align split buttons' text by default.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Fabian Maurer a51e20f5e0 comctl32/combo: Fix misleading indentation.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:35:23 +01:00
Gabriel Ivăncescu e09003babc comctl32/tests: Add tests for NM_CUSTOMDRAW buttons.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:55:19 +01:00
Gabriel Ivăncescu efacaf1b5a comctl32/button: Don't draw the button when losing focus before invalidating it.
It's already invalidated at the end so there's no reason to draw it before
that.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:55:06 +01:00
Gabriel Ivăncescu 026233c429 comctl32/button: Implement NM_CUSTOMDRAW for BS_USERBUTTON.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:55:02 +01:00
Gabriel Ivăncescu 04de7c9f05 comctl32/button: Implement NM_CUSTOMDRAW for other themed buttons.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:54:59 +01:00
Gabriel Ivăncescu 8fdc9d76a9 comctl32/button: Implement NM_CUSTOMDRAW for other buttons.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:54:32 +01:00
Gabriel Ivăncescu 3062a594bd comctl32/button: Implement NM_CUSTOMDRAW for themed Push Buttons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10531
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:54:22 +01:00
Gabriel Ivăncescu 4b85740ebf comctl32/button: Implement NM_CUSTOMDRAW for Push Buttons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10531
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:54:14 +01:00
Michael Stefaniuc e0419391d7 comctl32/tests: Remove redundant not-NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 12:26:11 +01:00
Gabriel Ivăncescu 44e6fff010 comctl32/listbox: Implement LBS_NODATA for multi-selection listboxes.
Use a byte array to store selection state of items, since we don't need any
other data for LBS_NODATA multi-selection listboxes. This improves memory
usage dramatically for large lists, and performance boosts are nice too.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Gabriel Ivăncescu a853301e7a comctl32/listbox: Use a helper to get the size of an item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Huw Davies b60108e022 comctl32/listbox.c Use helper functions for item initialization.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Vijay Kiran Kamuju 7a6b00dc25 user32: Add DlgDirList wildcard checks.
Based on a patch from Christian Lupien.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8226
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 22:21:17 +01:00
Gabriel Ivăncescu 874c5508ee comctl32/listbox: Rewrite FindString to use helpers and avoid the macro.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 16:29:37 +01:00
Gabriel Ivăncescu 2fddd6211e comctl32/listbox: Use a helper to set item data by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 16:29:35 +01:00
Nikolay Sivov 71004a825f comctl32/propsheet: Avoid posting uninitialized data (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46691
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:51:21 +01:00
Gabriel Ivăncescu 170f59e574 comctl32/listbox: Use is_item_selected in GetSelCount and GetSelItems.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:51:21 +01:00
Michael Stefaniuc e4f66b0483 comctl32: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:27:20 +01:00
Austin English b4a9f3f3f3 comctl32: Fix a memory leak (valgrind).
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:07:38 +01:00