Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.
See https://github.com/wxWidgets/wxWidgets/pull/1192
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
Under some (not totally clear) circumstances, a TLW can remain inactive
after being shown, which is undesirable, as it prevents setting focus to
its children from working.
Work around this by calling activateWindow() explicitly if necessary.
Closes https://github.com/wxWidgets/wxWidgets/pull/1179
After the addition of EventCounter::WaitEvent() call in the previous
commit these checks pass as well (with another WaitEvent() added to wait
for deactivation event as well).
Call DoSetSelectionAfterInsertion() instead of partially duplicating it.
This ensures that m_selection is correct after inserting a new page,
which wasn't the case before. Surprisingly, this didn't actually matter
because wxGTK implementation doesn't really use the base class
m_selection neither and just queries GTK+ widget directly for its
selection in GetSelection() instead, but it was at the very least
confusing.
Make wxGTK consistent with wxMSW and wxOSX and also make it pass the
unit test added in the previous commit by suppressing events generated
by gtk_notebook_insert_page() when adding the first page (but not any
subsequent ones).
Just use DoSetSelectionAfterInsertion() provided by the base class,
which does the right thing already, including both setting m_selection
and sending (or not sending) the corresponding events.
Having this method didn't really help, it's simpler and more
straightforward to implement ChangeSelection() as a signal-blocking
wrapper around SetSelection() instead.
No real changes in behaviour, this is a pure refactoring.
Several improvements to the buttons pages of the widgets sample:
- Use a valid font when creating the bitmap.
- Create the bitmap with an DPI independent size.
- Use different images for different button states, as described by the
checkbox options.
- Add a checkbox to disable the bitmap.
- Recreate the button when changing label, so the bitmap is updated.
- Implement the 'fit exactly' option on ToggleButton page.
- Use more wxSizerFlags in widgets sample.
See https://github.com/wxWidgets/wxWidgets/pull/1188
Several wxRadioBox-related improvements:
- Fix its minimum width calculation to take the title into account.
- Remove unused nor useful wxRA_LEFTTORIGHT and wxRA_TOPTOBOTTOM.
- Tidy up the radiobox page of the widgets sample.
See https://github.com/wxWidgets/wxWidgets/pull/1187
Several fixes:
* Clear the buttons background, which can be important if their (custom)
bitmap is transparent.
* Only add margin before/after the corresponding button if it is
actually visible.
* Select the bitmap out of wxMemoryDC before modifying it.
* Don't assume that the "Cancel" button is always square.
Closes https://github.com/wxWidgets/wxWidgets/pull/1142
This restores the default behavior of a popup window in MSW to the
behavior it had before 56c4191168. The new
flag added by this commit can be used to give the popup window the
behavior from after that commit, i.e. choose the implementation using a
WS_POPUP window rather than the default one using a WS_CHILD of the
desktop.
The old behavior kept the popup from taking focus from its parent window
but left some controls not working. The new behavior has the popup take
focus and lets all controls work.
Closes https://github.com/wxWidgets/wxWidgets/pull/1123
Including <winsock.h> and <winsock2.h> is incompatible and if the
application wants to use the latter, it may be convenient to define
wxUSE_WINSOCK2 when building wxWidgets instead of having to work around
winsock.h implicit inclusion from include/wx/msw/wrapwin.h.
Closes https://github.com/wxWidgets/wxWidgets/pull/1122
Use a valid font when creating the bitmap.
Create the bitmap with a DPI independent size.
Use different images for different button states, as described by the checkbox
options.
Add a checkbox to disable the bitmap.
Recreate the button when changing label, so the bitmap is updated.
Implement the 'fit exactly' option on ToggleButton page.
Make the reset button work by binding to OnUpdateUIReset.
Use wxSizerFlags based API.
Remove minimum size of right panel so the minimum size of wxRadioBox can be
verified.
Use wxArrayString instead of manually creating and deleting an array of
wxString pointers.
Reapply disabling and hiding the test button, and check if test button is
available.
Layout the entire page instead of only the sizer, see #18100.
This was only used in wxUniv, wxRA_SPECIFY_[COLS/ROWS] can be used instead.
Do not remove them from the definitions, to not break user code.
Closes#18100.
Ensure the selected state tracks the Qt selection: without this, if
no explicit selection is made after adding the pages,
wxNotebook::GetSelection() returns wxNOT_FOUND even though the first
page is selected.
Closes https://github.com/wxWidgets/wxWidgets/pull/1182
Qt documentation advises to avoid calling repaint() except when an
immediate update is required, i.e. it corresponds to wxWindow::Update().
Use update() instead to avoid many Qt warnings that appeared when
resizing the caret sample window, for example.
Closes https://github.com/wxWidgets/wxWidgets/pull/1178
Update the actual tool tip used by Qt and not just the internal variable
when SetTip() is called.
Also implement wxToolTip::SetWindow().
Closes https://github.com/wxWidgets/wxWidgets/pull/1175
We already had WX_ASSERT_EVENT_OCCURS_IN macro and a recent commit also
added code doing almost the same thing manually in wxTopLevelWindow unit
test, which was one version too many.
Replace both of them with the new EventCounter::WaitEvent().
No real changes, this is just a refactoring.