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
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
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
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
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
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
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
Nikolay Sivov
ec09119f2e
comctl32/button: Fix text buffer leak (Coverity).
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 15:41:54 +02:00
Zhiyi Zhang
81f6437482
comctl32/button: Support BCM_GETIDEALSIZE message.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24623
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:46 +02:00
Zhiyi Zhang
eb79ebe50c
comctl32/button: Support text margin rendering.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:39 +02:00
Zhiyi Zhang
c9aa8dab8f
comctl32/button: Support imagelist rendering.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40445
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40062
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45246
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:33 +02:00
Zhiyi Zhang
790d13ee98
comctl32/button: Avoid push button content covering frames.
...
A focus frame may be covered by content in the push button.
Shrink the label rectangle before layout calculation so that
content can never cover the frame.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:20 +02:00
Zhiyi Zhang
1f323f31d6
comctl32/button: Support displaying both image and text.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45727
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:01 +02:00
Zhiyi Zhang
fa4183ef84
comctl32/button: Use get_draw_state() helper.
...
Use a helper so that the get draw state routine can be shared
by later code.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:04:55 +02:00
Nikolay Sivov
40298cc69a
comctl32/button: Use per-window dpi settings.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 17:39:56 +02:00
Zhiyi Zhang
84ce292217
comctl32: Fix checkbox wrong box alignment with BS_VCENTER.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-26 21:17:38 +02:00
Zhiyi Zhang
45eb3cb4fc
comctl32: GroupBox can have multiline text.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-18 17:10:47 +02:00
Zhiyi Zhang
1c6e71d62a
comctl32/button: Implement BCM_{GET,SET}TEXTMARGIN message.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 22:04:25 +02:00
Zhiyi Zhang
0d4940b732
comctl32/button: Implement BCM_{GET,SET}IMAGELIST message.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 22:04:25 +02:00
Zhiyi Zhang
05d4e4a23b
comctl32/button: Remove style checking when handling BM_SETIMAGE.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 09:44:29 +02:00
Nikolay Sivov
b442a5c0f0
comctl32/button: Keep control style.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 12:28:12 +02:00
Nikolay Sivov
733a3ec1b9
comctl32/button: Improve button data layout compatibility.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-30 16:52:05 +02:00
Zhiyi Zhang
06d2ad29ae
comctl32/button: Implement BCM_{GETNOTE,SETNOTE,GETNOTELENGTH} message.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-28 19:37:26 +02:00
Nikolay Sivov
81e698da27
comctl32/button: Do not select old font back after painting.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-01 19:25:57 +01:00
Nikolay Sivov
6e55073574
comctl32/button: Use allocated structure to keep control data.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 19:34:41 +01:00
Nikolay Sivov
389c3add0a
comctl32/button: Fix paint handler check when theming is on.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 20:37:56 +01:00
Nikolay Sivov
9d897b73a8
comctl32/button: Use the global memory allocation helpers.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-13 20:23:27 +01:00
Nikolay Sivov
65f23a745a
comctl32/button: Use messages to get control text.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-13 20:23:27 +01:00
Nikolay Sivov
287c5a25b6
comctl32/button: Invalidate on BM_SETCHECK.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 11:07:41 +01:00
Nikolay Sivov
f8eb74e10c
comctl32/button: Invalidate on BM_SETSTATE.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 11:07:38 +01:00
Nikolay Sivov
f1cc2da207
comctl32/button: Merge theming logic.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 11:07:35 +01:00
Nikolay Sivov
7625a1bb72
comctl32: Remove confusing comments.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 09:19:48 +01:00
Nikolay Sivov
31d3fcc0b2
comctl32: Introduce Static control.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 13:10:37 +01:00
Nikolay Sivov
bf152cb0cc
comctl32/button: Fix dialog code for new button types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 19:38:30 +01:00
Nikolay Sivov
598d369934
comctl32/button: Use push button paint handler for split and command link buttons.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 14:28:10 +01:00
Nikolay Sivov
5d10abde50
comctl32: Introduce Button control.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 14:28:10 +01:00