In the dialog font resource, replace "FONT 8, "MS Sans Serif"
with "FONT 9, "MS Shell Dlg 2". This makes the native dialog
look more natural since Windows Vista.
Closes#26806.
When using wxGCDC (applies to both GDI+ and Direct2D backends)
created from wxPaintDC, the default text color is white even
in the dark mode.
Work around this by explicitly setting the text color to the window
foreground color.
Closes#26788.
Replacing wxIMPLEMENT_APP() with wxIMPLEMENT_APP_CONSOLE() allows
building the sample on Windows with CMake with wxWidgets built in
the monolithic configuration.
The archive sample is a console, not GUI, sample and console applications
should use wxIMPLEMENT_APP_CONSOLE() instead of wxIMPLEMENT_APP(). This
matters on Windows when compiling with MSVC and the linker subsystem set
to console.
It can still work when wxUSE_GUI=0 is defined but this is not possible
with wxWidgets monolithic build, where wxUSE_GUI=1 is defined for all
the projects.
Closes#26755.
Prevent the signed/unsigned comparison compiler warning.
Remove the unused header.
Make the sample follow the wxWidgets coding style standards.
Fix the stylus sample in MSVS samples solutions.
Closes#26746.
With these changes, wxApp::SetAppearance() and
wxApp::MSWEnableDarkMode() can change the dark/light mode at any time.
They can be called before or after windows are created, and can be
called more than once.
The widgets sample has new menu commands to demonstrate this.
Closes#26734.
Fix wxGrid for system color change for colors that were assigned
defaults in Init(), and therefore did not update. These colors are
now determined as needed during drawing.
The grid sample "Colours" menu gets additional commands so you can set
all these colors.
Closes#26729.
Track the active DL nesting depth while parsing definition lists and
use it when indenting DD content, so nested definition lists are laid
out deeper than their parent item. Add parser coverage and a sample
case for the old nested DL repro.
Fixes#20752.
Closes#26676.
Apply TABLE ALIGN to the wrapper that positions the table instead of
using it as the default alignment for TD/TH content. Leave cell text
alignment controlled by row/cell alignment, with the existing TH default.
Add a parser layout regression test and sample markup for the centered
table case.
Fixes#21853.
Closes#26672.
The sample used <Alt+F> for the Get menu info command. However,
this conflicted with the shortcut used to invoke the File menu.
Fix this by using a different shortcut for the Get menu info.
The old-but-still-supported MSVS 2015 has problem parsing Unicode
literals outside the BMP when using the '\U' escape. Use raw octet
syntax to work around this.
Enable color font option for Direct2D text drawing on Windows 8.1 and
newer.
Closes#19275.
Closes#26657.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
Don't mirror coordinates passed to GDI functions in RTL layout as they
already mirror them internally, resulting in incorrect coordinates being
used. As a consequence, wxDC::LogicalToDevice() now always returns
unmirrored coordinates, even in RTL layout, which is consistent with
wxGTK3 and wxQt.
Also fix scaling even in LTR layout by using ::ScaleWindowExtEx().
See #26398.
- Update wxRibbonPanel to accept wxBitmapBundle for minimised icons.
- Modify wxRibbonToolBar to utilize wxBitmapBundle for tool icons.
- Change wxRibbonAUIArtProvider and wxRibbonMSWArtProvider to handle
wxBitmapBundle for drawing operations.
- Adjust wxRibbonGallery to support wxBitmapBundle for gallery items.
- Implement DPI change handling in wxRibbonBar, wxRibbonPage,
wxRibbonPanel, and wxRibbonToolBar to recalculate sizes and redraw
with the correct bitmap for the current DPI.
- Ensure all relevant methods and event handlers are updated to work
with wxBitmapBundle instead of wxBitmap.
Closes#26117.
Use sizer to position the buttons on the new pages instead of hardcoding
the buttons positions which, unsurprisingly, didn't work well and
resulted in buttons overlapping each other in high DPI.
Using wxScrolled<> on the wxFrame meant that the status
bar moved when scrolling, so use give the frame a
wxScrolledCanvas child.
Also, wxDC::FloodFill() doesn't seem to work well with a
scrolling window. (Maybe because the center point isn't
necessarily visible?) Using DrawRectangle(), etc works
better.
Add wxScrolled<> API to enable autoscroll when
wxScrolled<> does not have mouse capture. The
intent is that autoscroll-without-capture can be
enabled on DragEnter and disabled on DragLeave.
Implement this function as a trivial wrapper for wglGetProcAddress(),
glXGetProcAddressARB() or eglGetProcAddress() depending on the platform
(currently not implemented for macOS).
Account for the known bug in some Windows OpenGL drivers by checking for
manifestly invalid return values and handling them as null.
Use the new function in wxGL code itself and in the pyramid sample.
Closes#9215.
Closes#26209.
Support auto-scrolling both orientations simultaneously and make
auto-scroll region configurable.
Also allow changing auto-scroll dir without ending drag operation and
starting another one.
Closes#25978.
Calling ClearBackground() followed by a Refresh() doesn't make any sense
because ClearBackground() either a no-op (e.g. wxGTK) or just redundant
under (wxOSX and wxQt) or will be overwritten in wxMSW.
This was not only useless, because the controls were repositioned by the
sizers later anyhow, but also actively harmful in at least one case,
when creating a control with wxTE_MULTILINE and wxTE_NO_VSCROLL styles
with too small height prevented the text from being appended to it.
Closes#26177.