Commit Graph

60894 Commits

Author SHA1 Message Date
JulianSmart
f8bc9abfc4 Work around poor image scaling on WIN32, especially on HiDPI displays where all images without size specification will be scaled 2015-11-29 20:01:10 +00:00
JulianSmart
c3ae2fc54a Use content scale factor to make wxHTML DPI-aware 2015-11-29 19:36:14 +00:00
JulianSmart
78fe0ac3d8 Fix for breakage with multiple books 2015-11-29 19:29:04 +00:00
Gavs64
ab95207c78 Fix message boxes with wxYES_NO|wxCANCEL style in wxMSW
Windows CE code removal in 8282c1be0f (see
https://github.com/wxWidgets/wxWidgets/pull/81) broke message boxes showing
"Yes", "No" and "Cancel" buttons at once, add accidentally removed code back.

Closes https://github.com/wxWidgets/wxWidgets/pull/139
2015-11-29 16:22:16 +01:00
Artur Wieczorek
2db2db7044 Merge pull request #134 from a-wi/pg_draw_colours_alpha_fix
Fix build failures on some platforms after 7be75892.
2015-11-29 13:54:36 +01:00
Artur Wieczorek
0d30db33e1 Fix build failures on some platforms after 7be75892.
Add header files to have full declarations of wxMemoryDC and wxMetafileDC which are apparently necessary on some platforms for wxDynamicCast.
2015-11-29 09:25:19 +01:00
Artur Wieczorek
7be75892a3 Fixed drawing colours with alpha in wxSystemColourProperty (wxPG).
For systems which don't support drawing with alpha on standard DC (like e.g. Win, GTK2) there is necessary to use graphics context for this purposes.
2015-11-27 21:36:21 +01:00
Vadim Zeitlin
9990959c99 Get rid of unnecessary wxColour::InitFromComponents() in wxOSX
This method was confusing and dangerous as it didn't actually initialize the
wxColour object because it didn't set its m_cgColour and so attempting to use
wxColour "initialized" using this method resulted in a crash whenever its
GetPixel(), GetCGColor() or CreateCGColor() methods were called.

Just merge this function with InitCGColorRef() which is the only remaining
place where it's used after rewriting wxColour(NSColor) ctor.
2015-11-27 00:19:37 +01:00
Vadim Zeitlin
10162b79fc Handle pattern colours in wxColour ctor from NSColor
Some colours returned in wxSystemSettingsNative::GetColour() can't be
represented in RGBA color space as they use patterns, which explained why the
compilation fix for 10.7 SDK in 56ebe6dfac
resulted in run-time crashes.

Add code to support converting such NSColor objects to CGColorRef via
NSImage, CGImageRef and CGPatternRef to make things really work.

See #17141
2015-11-27 00:06:25 +01:00
Vadim Zeitlin
3fc74d5a0f Fix wxColour(NSColor) ctor and use it in wxOSX code
wxColour ctor from NSColor added in b478f24288
didn't work correctly as it didn't initialize wxColour::m_cgColour and so any
attempts to use the colour created by it resulted in an immediate crash (so
the code added in 16671f229a likely didn't work
neither).

It also assumed that the NSColor given to it was always in the RGBA colorspace
and crashed if it wasn't (so 56ebe6dfac fixed
compilation at the price of making the code crash at run-time). Now explicitly
request the RGBA colorspace and leave the colour uninitialized, which is
better than crashing, if it can't be obtained.

After making this ctor safe to use, there is no reason to reproduce its logic
in wxColourDialog and wxFontDialog, so just use it from there.

Also make the ctor explicit as it's a non-trivial operation which shouldn't be
performed implicitly and document that it doesn't take ownership of NSColor,
unlike the similar ctor from CGColorRef.
2015-11-26 23:57:29 +01:00
Vadim Zeitlin
bcd16394df Use wxColour::OSXGetNSColor() instead of reproducing it
No real changes, just simplify wxOSX code by using the existing
wxColour::OSXGetNSColor() method instead of reproducing it in many places.
2015-11-26 23:54:28 +01:00
Vadim Zeitlin
200f24301c Merge changes adding missing FromDIP() calls and ToDIP()
Use DIP instead of physical pixels and add ToDIP(), symmetric to FromDIP(), to
convert from the latter to the former.
2015-11-25 20:02:56 +01:00
Vadim Zeitlin
3195ba7fb4 Simplify code by using wxCHECK instead of a test and wxFAIL
Make the code shorter and arguably more clear.
2015-11-25 20:02:56 +01:00
Vadim Zeitlin
56ebe6dfac Use wxColour ctor from NSColor directly
This makes the code simpler and fixes compilation with 10.7 SDK which doesn't
have CGColor property in NSColor.
2015-11-25 20:02:56 +01:00
Steve Browne
8f92be3c6b Improved readability of font changes to wxRendererMSW::GetCheckBoxSize and no longer force the window to redraw. 2015-11-24 19:44:26 -05:00
Steve Browne
8ede2351cc Fixed indentation in ToDIP to make it consistent with FromDIP. 2015-11-24 19:42:14 -05:00
JulianSmart
0185d61a2c Ensure toolbar fits controls that are taller than the buttons in wxMSW toolbar 2015-11-24 21:28:09 +00:00
Steve Browne
1af2cdd200 Updated interface file to document wxWindow::ToDIP. 2015-11-24 13:16:20 -05:00
Steve Browne
bbb6dbea1b Added wxWindow::ToDIP functionality. 2015-11-24 12:47:31 -05:00
Steve Browne
633d04ca92 Changed several places using hard-coded size values to use FromDIP instead. 2015-11-24 12:21:43 -05:00
Troels Knakkergaard
ed4dbc024d Print selected pages when "Selection" is chosen in MSW print dialog
Really print the selected pages and not the pages explicitly listed in the
"Pages" text entry field in the MSW native print dialog when "Selection" radio
button is checked.

Closes #17266, #17200.
2015-11-24 18:20:54 +01:00
Vadim Zeitlin
6d38fb81dc Merge wxOVERRIDE additions branch
Add even more wxOVERRIDEs to avoid clang warnings under OS X.

Closes https://github.com/wxWidgets/wxWidgets/pull/130
2015-11-22 15:22:23 +01:00
Artur Wieczorek
fc5033afde Fix passing alpha channel to/from colour dialog for GTK+ 2.
Pass to/from GtkColorSelection widget also alpha component of the selected colour.
2015-11-22 10:55:15 +01:00
Hartwig
474461601f Addition of overrides in diverse headers 2015-11-22 10:16:01 +01:00
Hartwig
308de8b69d Addition of overrides in anybutton.h, collpaneg.h, notebook.h, spinctlg.h, srchctrl.h and radiobox.h 2015-11-22 10:15:41 +01:00
Hartwig
5e39dd361f Addition of overrides in renderer.cpp 2015-11-22 10:14:51 +01:00
Hartwig
5f7c4fa859 Addition of overrids in scrolbar.h, slider.h and vscroll.h 2015-11-22 10:14:29 +01:00
Hartwig
6802052efb Addition of overrides in colrdlgg.h ad fontdlgg.h 2015-11-22 10:13:27 +01:00
Hartwig
44715066da Addition of overrides in checklst.h and listbox.h 2015-11-22 10:12:58 +01:00
Hartwig
b67c5a9395 Addition of missing overrides in dirdlgg.h and filedlgg.h 2015-11-22 09:54:05 +01:00
Hartwig
c09ff65f7e Addition of missing overrides in statusbr.h and toolbar.h 2015-11-22 09:52:21 +01:00
Hartwig
f659422405 Addition of missing overrides in private.h 2015-11-22 09:50:27 +01:00
Hartwig
ed2d6152ec Addition of missing overrides in textctrl.h 2015-11-22 09:47:31 +01:00
Hartwig
da7c2e67b9 Addition of missing overrides to webkit.h 2015-11-22 09:45:47 +01:00
Hartwig
0b6b645412 Addition of missing overrides to splitter.h 2015-11-22 09:45:35 +01:00
Hartwig
57e10b695d Addition of missing overrides in glcanvas.h 2015-11-22 09:44:15 +01:00
Hartwig
1eb241e97b Addition of missing overrides in toplevel.h 2015-11-22 09:44:01 +01:00
Hartwig
612972a50c Addition of missing overrides to dataview.h 2015-11-22 09:42:01 +01:00
Hartwig
aa13cb8491 Addition of missing overrides to datecctrl.h and datetimectrl.mm 2015-11-22 09:38:20 +01:00
Hartwig
2a6d18547c Addition of missing overrides to frame.h 2015-11-22 09:36:45 +01:00
Hartwig
1da514f1b9 Addition of missing overrides in window.h 2015-11-22 09:34:47 +01:00
Hartwig
74a1ec3ead Addition of missing overrides to apptrait.h 2015-11-22 09:28:33 +01:00
Hartwig
e64489d5be Addition of missing overrides to app.h 2015-11-22 09:27:37 +01:00
Artur Wieczorek
363492e50b Fix initialization of custom colours for colour dialog in wxSystemColourProperty::QueryColourFromUser.
Use number of custom colours taken from wxColourData instead of using explicit numeric value.
2015-11-18 20:16:06 +01:00
Artur Wieczorek
17d5429276 Fix choosing custom colour with opacity in wxColourProperty (wxPG).
Invoke colour dialog with opacity option enabled when wxColourProperty is used with alpha support enabled (wxPG_COLOUR_HAS_ALPHA attribute is set).
2015-11-18 20:13:24 +01:00
Vadim Zeitlin
e58e3f67aa Merge branch 'colour_dialogs_alpha' of https://github.com/a-wi/wxWidgets
Add support for alpha channel to wxColourPicker and wxColourDialog in wxGTK.

Closes #14127.
2015-11-17 22:47:49 +01:00
Bryan Petty
c6b744facb Clarify location of built release packages. 2015-11-15 21:31:38 -07:00
Vadim Zeitlin
cc27d305a2 Restore wxSTC built-in key mappings for non-Mac platforms
This was broken by bfdf70d14a, so keep one of
the changes done there conditional on the platform to avoid changing behaviour
for the non-Mac ones.

Closes #17251.
2015-11-16 03:18:06 +01:00
Troels Knakkergaard
2460410278 Add wxListCtrl::GetAlternateRowColour()
Simple accessor matching the existing setter.

Closes #17250.
2015-11-16 03:10:16 +01:00
Vadim Zeitlin
7c82b9a504 Really fix MSW message logging with wxDEBUG_LEVEL>=2
Now the code not only compiles, but also actually works, unlike before when %p
was used with non-pointer types.

Closes #17095.
2015-11-16 03:00:36 +01:00