Add an explicit cast to avoid warnings when compiling with this option.
While just casting double to float is not the best idea, it seems quite
unlikely that anybody would pass a value outside of float range to this
ctor.
There is no need to use ConvertFromLegacyWeightIfNecessary() here as the
string representation is not supposed to contain the legacy weight
constants. And it was also used incorrectly, resulting in build errors
for e.g. wxDFB.
wxTreebook is supposed to allow not specifying any valid window for the
top-level pages, but this didn't work any longer, probably since the
changes of 02a92e23f3 (see #4379), as a
possibly null page was dereferenced without checking, resulting in a
crash.
Fix this by adding a missing check.
Also rename DoGetNonNullPage() to TryGetNonNullPage() to make it more
clear that this function can return null and add a unit test checking
that calling AddPage(NULL) really works (or at least doesn't crash).
See https://github.com/wxWidgets/wxWidgets/pull/921
Remove SetWindowMenuLabelTranslated() which was only called once and so
didn't seem to be worth having. Also get rid of WINDOW_MENU_LABEL for
the same reason: it was used only once and imposed the use of
gettext_noop() which is not needed any longer.
Rename GetWindowMenuLabelTranslated() to have a MSW prefix in order to
indicate that it's a private MSW function and not part of the public wx
API.
Also renamed "Translated" to "Current" to (hopefully) more clearly
indicate why do we need to keep this variable.
If the locale is changed while the MDI window menu is active, the menubar entry labelled with the previous translation will not be removed. The previous translation is now remembered and used to locate the menubar entry.
Add the source files of the generic dialogs to the project,
similar as is done in the bakefile.
See previous commits 573e887a4c and
6415bd553f, which partially reverted it,
for the full story.
Include both <algorithm>, to get std::swap() declaration when using
C++98, and <utility>, to do the same thing when using C++11.
This is not pretty but simpler than using preprocessor tests (which
would need to take MSVS into account in a special way) and virtually
guaranteed not to break anything.
Closes#18220.
Complete support for fractional point sizes and font weights other than
light/bold.
Also harmonize wxFont API and implementation among all ports (fixing
compilation of those of them that were broken by recent changes).
See https://github.com/wxWidgets/wxWidgets/pull/919
Window initial/minimum/maximum sizes are now treated as logical pixels.
Furthermore, many margins and paddings are now converted using
wxWindow::FromDIP() to allow their growth in accord with screen DPI.
This places buttons on toolbars more apart on high DPI screens providing
space for easier touch operations.
Closes https://github.com/wxWidgets/wxWidgets/pull/933
Use wxVector<wxListLineData*> instead of WX_DECLARE_OBJARRAY().
This modernizes the code and allows to get rid of the static variables
previously used for sorting as now we can use std::sort().
Closes https://github.com/wxWidgets/wxWidgets/pull/924
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.
Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
libraries for ARM64 component installed
Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
libraries.
Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
requires to hardcode Windows SDK to 10.0.15063.0 or later in
*.vcxproj files, which would render them non-compilable in older
Visual Studio versions. Microsoft is aware of this issue and is
planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.
Closes https://github.com/wxWidgets/wxWidgets/pull/923
Check that calling SetFractionalPointSize() and SetNumericWeight() at
the very least results in the expected return values from
GetFractionalPointSize() and GetNumericWeight().
Also stop scaling the font size by DPI manually, we don't need to do it
if we use points instead of pixels. This, in turn, made it unnecessary
to pass ID2D1Factory parameter to wxD2DFontData ctor.