Commit Graph

66747 Commits

Author SHA1 Message Date
Robin Dunn
2738565c0d Just API updates to allow building to succeed 2019-09-04 14:19:24 -07:00
Robin Dunn
1e37cca162 Like Direct2D inverting the matrix is needed for gradient transforms 2019-09-04 14:19:24 -07:00
Robin Dunn
fc35d8b49b Comment out some asserts I think are incorrect. Needs verification. 2019-09-04 14:19:24 -07:00
Robin Dunn
2571f5962c Don't use a wxRect to hold floating point values!! 2019-09-04 14:19:24 -07:00
Robin Dunn
a8eeab3af2 Add support for setting the transform on Direct2D gradient brushes 2019-09-04 14:19:24 -07:00
Robin Dunn
6d85b566ce Create gradient brushes for pens in wxD2DRenderer 2019-09-04 14:19:24 -07:00
Robin Dunn
e2fbcf0650 API updates only, to allow building. 2019-09-04 14:19:24 -07:00
Robin Dunn
8478c97ecb Add support for gradient pens for GDI+. API also updated for gradient transforms, but that is not working yet. 2019-09-04 14:19:24 -07:00
Robin Dunn
2008d443a8 Set the wrap mode for linear gradient brushes,
so the areas beyond the end points are properly filled with the end point colors
2019-09-04 14:19:24 -07:00
Robin Dunn
d6060db6f1 Add cairo_pattern_set_matrix 2019-09-04 14:19:24 -07:00
Robin Dunn
177f5d4f2a tweak comments 2019-09-04 14:19:24 -07:00
Robin Dunn
62ea72e937 Adding a matrix to wxGraphicsPenInfo means the classes need reordered again 2019-09-04 14:19:23 -07:00
Robin Dunn
7c33d3f969 Gradients can have matrix transforms too. Updates for Cairo. 2019-09-04 14:19:23 -07:00
Robin Dunn
fd0b19f277 Add the rest of the accessors in wxPenInfo and wxGraphicsPenInfo,
so wxPython can see them.
2019-09-04 14:19:23 -07:00
Robin Dunn
b98ab8b56d Switch to a switch statement 2019-09-04 14:19:23 -07:00
Robin Dunn
c860d50888 Rename some *GradientBrush to *GradientPattern 2019-09-04 14:19:23 -07:00
Robin Dunn
e297b5ded9 Deindent inline code blocks 2019-09-04 14:19:23 -07:00
Robin Dunn
7367f1803d Reorder classes a bit to resolve ordering conflicts 2019-09-04 14:19:23 -07:00
Robin Dunn
0265312297 Update include/wx/graphics.h
fix style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
06bf8e0d41 Update include/wx/graphics.h
fix opening brace style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
694b7e11fc Move the new methods to the wxCairoPenBrushBaseData section of the file 2019-09-04 14:19:23 -07:00
Robin Dunn
59ce48924a Add gradient pen support for Cairo 2019-09-04 14:19:23 -07:00
Robin Dunn
4708d2539e Add gradient-related attributes to wxGraphicsPenInfo 2019-09-04 14:19:23 -07:00
Robin Dunn
1269b712bb Add wxEVT_DPI_CHANGED 2019-09-04 14:14:59 -07:00
Paul Cornett
92cbb02e9f Fix erroneous header click event after double click
See #18490
2019-09-04 11:41:28 -07:00
Maarten Bent
2c27f9851b Check if window is created before getting the display it is on
If it is not initialised, getting the screen rectangle will fail, so
don't even try doing it, but just return wxNOT_FOUND instead, so the
main display will be used -- this is the best we can do if the window
hasn't been created yet, as we don't know on which display it will
appear.

Closes https://github.com/wxWidgets/wxWidgets/pull/1527

Closes #18481.
2019-09-04 00:33:32 +02:00
Vadim Zeitlin
3d73b30b56 Fix recently broken AUI layout
The changes of 5873ee7e4a completely broke
AUI layout as wxAUI code relies on Layout() still performing the layout
even when GetAutoLayout() returns false, but the new wxTLW::Layout()
didn't do anything in this case.

Fix the problem by checking whether we have a sizer or constraints in
this function instead of using GetAutoLayout(), which is supposed to
only be used by wxEVT_SIZE handler to determine if Layout() should be
called in the first place, but not by Layout() itself.

Closes #18486.
2019-09-04 00:28:22 +02:00
Paul Cornett
560c247feb Write PNG image data directly to wxImage buffer when possible
If there is no alpha or mask, copying from an intermediate buffer is not necessary.
2019-09-03 11:12:20 -07:00
Artur Wieczorek
991f11707f Convert wxImage with mask to wxBitmap with alpha channel
Since we always convert wxImage to 32 bpp wxBitmap, there is no reason to keep a separate mask for wxBitmap because alpha channel can be used directly.
2019-09-01 11:01:38 +02:00
Artur Wieczorek
9404dc2f9a Fix creating alternate bitmap for toggle wxToolBar button
We need to fill entire area of the alternate button to the transparent colour prior to drawing non-transparent grey background.

Closes #18468.
2019-08-30 00:05:56 +02:00
Artur Wieczorek
8403b79ad7 Fix colours of mask bitmap
Monochrome mask bitmap should have white pixels in the unmasked area and black pixels in the masked area, quite the opposite to what is implemented now.

Closes #10098.
2019-08-30 00:03:37 +02:00
Artur Wieczorek
0522587bcb Fix creating a bitmap representing wxMask
When bitmap data are accessed with wxNativePixelData, which is designed
to handle RGB bitmaps, Alpha() function cannot be used because in this
case alpha component index is set to the default value -1 and actually
the blue component of the "preceding" pixel is accessed.

Closes #18478.
2019-08-29 18:35:14 +02:00
Vadim Zeitlin
417eff2bf8 Add missing wxUSE_MENUS checks to generic MDI classes
Make mdig.cpp compile with wxUSE_MENUS==0, as it already had many
wxUSE_MENUS checks and only missed a few more of them.

See #9626.
2019-08-28 20:11:23 +02:00
Ian McInerney
2f8b2d9a8e Fix deletion of array in fswatcher_inotify 2019-08-28 09:44:55 -07:00
Paul Cornett
df450566dd Avoid including X11 headers from <wx/glcanvas.h>
It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
2019-08-28 09:37:49 -07:00
Vadim Zeitlin
20b9964007 Avoid warnings about deprecated wxPG_XXX when building wx itself
Getting the warnings about deprecated macros when building the library
itself is not useful, as it must continue to use them as long as
WXWIN_COMPATIBILITY_3_0 exists.

Closes https://github.com/wxWidgets/wxWidgets/pull/1510
2019-08-27 22:21:01 +02:00
Ilya Sinitsyn
1bce1a1d4c Make using non-wxControl-derived wxGrid editors really work
While feacaf8714 changed the API to allow
using any wxWindow (and not only a window of a wxControl-derived class)
as the associated window of the grid editor, actually doing resulted in
an immediate crash due to dereferencing a null pointer in wxGrid code
which still expected to have a wxControl.

Fix this by replacing all calls to wxGridCellEditor::GetControl() inside
wxGrid with wxGridCellEditor::GetWindow(), to ensure that a non-null
editor window is used even in this case.

Closes https://github.com/wxWidgets/wxWidgets/pull/1509
2019-08-27 22:09:03 +02:00
wangqr
0ea4366163 Fix the width of expander in wxDataViewCtrl
In 8f386265dc, the width of a tree
expander is changed to the native value on the platform. But some
calculations still use guessed value (m_lineHeight) as the width. This
fixes the value, by retrieving the width using the same method as in
OnPaint().

Closes https://github.com/wxWidgets/wxWidgets/pull/1508

Closes #18473.
2019-08-27 13:19:48 +02:00
Vadim Zeitlin
83134174fa Merge branch 'menu_highlight_event' of https://github.com/imciner2/wxWidgets
Set menu object for the menu highlight events too.

See https://github.com/wxWidgets/wxWidgets/pull/1506
2019-08-27 13:13:23 +02:00
Vadim Zeitlin
6596f5a98d Merge branch 'accel_key_compat' of https://github.com/imciner2/wxWidgets
Give warnings for accelerator keys not supported by GTK under all
platforms instead of using asserts fin wxGTK only.

See https://github.com/wxWidgets/wxWidgets/pull/1505
2019-08-27 13:11:07 +02:00
Vadim Zeitlin
feb30d3929 Merge branch 'wxhtml-total-width'
Fix computation of max total width for container cells in wxHTML.

See https://github.com/wxWidgets/wxWidgets/pull/1504
2019-08-27 13:09:51 +02:00
Vadim Zeitlin
5873ee7e4a Merge branch 'tlw-layout'
Make wxTLW::Layout() do the right thing and resize the only child to fit
the entire TLW client area.

See https://github.com/wxWidgets/wxWidgets/pull/1496
2019-08-27 13:08:47 +02:00
Vadim Zeitlin
b225d78187 Merge branch 'per-monitor-dpi-aware-framework' of https://github.com/MaartenBent/wxWidgets
Add preliminary support for per-monitor DPI awareness to wxMSW.

Individual controls still need to be fixed, so this support is still
experimental/unfinished for now.

See https://github.com/wxWidgets/wxWidgets/pull/1499
2019-08-27 12:59:56 +02:00
Paul Cornett
536025791a Avoid converting empty strings to NULL pointers in non-Unicode build
...when using utf8_str() or wxGTK_CONV as argument to const char* function parameter
2019-08-25 23:08:59 -07:00
Paul Cornett
db16c7af93 Avoid deferred show if frame is iconized 2019-08-25 21:10:52 -07:00
Paul Cornett
453999737f Simplification to avoid unreachable code 2019-08-25 21:03:21 -07:00
Paul Cornett
fca4ef0458 Use wxDC rather than wxClientDC for parameter type 2019-08-25 20:53:33 -07:00
Paul Cornett
3b54720b3a Move wxKeyEvent assignment operator out of header
It causes a warning with MSVC code analysis:
"warning C26437: Do not slice (es.63)"
It's unclear if this function even needs to exist, but at least
move it out of line so the warning does not occur for user code.
2019-08-25 18:11:01 -07:00
Paul Cornett
cf4f3a92c5 Avoid Gdk-CRITICAL warnings when GTKFindWindow() is passed an unrealized widget 2019-08-25 17:57:55 -07:00
Maarten Bent
10fec15751 Calculate correct font pointSize for GetNonClientMetrics
wxNativeFontInfo constructor calculates the pointSize using the main screen DPI.
But lfHeight returned by GetNonClientMetrics is based on the window DPI.
2019-08-25 22:01:56 +02:00