There is no need to allocate neither RowRanges nor HeightCache on the
heap, just create them on the stack -- if nothing else, this ensures we
don't leak memory, unlike before.
Don't use the template specified by the filter in the file open dialog
if it's incapable of actually handling the current file.
This fixes a regression compared to 2.8 in docview code and allows
opening a file using the correct template for its extension even if an
incorrect (e.g. default) filter is chosen in the file open dialog.
Closes#18123.
wxScrollBar::SetScrollbar() now blocks the signals of QScrollBar before
setting a value, which avoids behaviour where slots are called before
the QScrollBar is displayed.
Closes https://github.com/wxWidgets/wxWidgets/pull/1050
Make sure rasterColourOp is always initialized, even if none of the
switch cases matches, to avoid warnings about possibly uninitialized
variable.
See https://github.com/wxWidgets/wxWidgets/pull/1048
Removing a page from wxToolbook could result in crashes due to
dereferencing the now invalid page index. Fix this by not assuming that
the page index is the same as its tool ID, but adding functions to
explicitly map one to the other.
Also fix inserting pages into wxToolbook, which worked as appending them
before.
Closes https://github.com/wxWidgets/wxWidgets/pull/1042Closes#18275.
The default value of QProgressBar is -1, while wxGauge initial value
must be 0, so set it explicitly to fix a unit test failure with wxQt.
Closes https://github.com/wxWidgets/wxWidgets/pull/1043
::GetThemeMargins() may fail if the custom theme being currently used
doesn't implement the required functionality, so initialize MARGINS with
some reasonable values before calling it, if only in order to avoid
using uninitialized (and so wildly wrong) margin values in this case.
Closes https://github.com/wxWidgets/wxWidgets/pull/1036Closes#18278.
When creating a QSpinBox, the range must be set before setting the
initial value as otherwise setting it would fail if it were outside of
the default [0, 99] range.
This fixes a test failure in the corresponding unit test.
Closes https://github.com/wxWidgets/wxWidgets/pull/1041
wxMSW and wxOSX/Cocoa show the labels vertically for the tabs positioned
on the left- or right-hand side of wxNotebook, but wxGTK showed them
horizontally.
Bring it in sync with the other ports by rotating the labels to draw
them vertically as the other ports do in wxGTK too.
Closes https://github.com/wxWidgets/wxWidgets/pull/1032
Update the colours used when the system theme changes.
This is especially important to use the colour scheme compatible with
macOS 10.14+ dark mode.
Note that this commit is best viewed with "git diff --color-moved".
Closes https://github.com/wxWidgets/wxWidgets/pull/916
Add functions to enable or disable pages inside wxToolbook.
Using the new functions you can present disabled icons so that the user
can expect more functionality and you do not need to add/remove pages in
different states.
Closes https://github.com/wxWidgets/wxWidgets/pull/1038