Commit graph

76218 commits

Author SHA1 Message Date
Vadim Zeitlin
2aea33c4ef Merge commit 'refs/pull/24337/head' of github.com:wxWidgets/wxWidgets
Add translucent stipple brush support under wxQt.

See #24337.
2024-02-19 03:39:43 +01:00
ali kettab
2135973f7d wxAUI: fix venetian blinds hint in dark mode
Also a small aesthetic change is made to make it easier to discern.

Closes #24338.
2024-02-19 03:36:39 +01:00
ali kettab
eebb5a587f Added translucent stipple brush support under wxQt 2024-02-18 18:32:33 +01:00
ali kettab
f9c2d24bb6 wxQt! Refactoring only 2024-02-18 17:32:15 +01:00
Doukas Dergiades
f24b3d5483 Save last wxSplitterWindow position before it was unsplit
Use this position when the window is split again and also save and
restore it from persistent storage in wxPersistentSplitter.

Closes #24329.
2024-02-18 01:23:24 +01:00
Vadim Zeitlin
7bf295802e Fix assert when creating multiple wxLogGui objects
Recent changes of cc9f9af400 (Flush wxLogGui before showing a modal
dialog, 2024-01-20) resulted in a (harmless) assertion failure in
wxModalDialogHook::Register() if the application created more than one
wxLogGui object.

Fix this by only registering our hook when the first wxLogGui object is
created and not for each of them.

See #24231, #24228.
2024-02-18 01:23:22 +01:00
Blake Madden
7150e6ecb3 Make recently added wxRibbonPage::GetPanelCount() const
Closes #24333.

Closes #24334.
2024-02-16 19:37:24 +01:00
Vadim Zeitlin
63a40637eb Make wxXmlNode::GetDepth() parameter const
There is no need to require a non-const pointer here.

Closes #24317.
2024-02-16 14:24:40 +01:00
taler21
85b04c1c24 Don't reset selection while Ctrl or Shift key is pressed
Don't reset the selection in a generic multi-selection wxListCtrl while
Ctrl or Shift key is pressed to be consistent with wxMSW behaviour.

This commit is best viewed ignoring whitespace-only changes.

Closes #24332.
2024-02-16 14:01:31 +01:00
Lauri Nurmi
1bef48229e Fix duplicate accelerator for the font dialog in dialogs sample
Shift-Ctrl-N was already taken when it was added for the font dialog in
9b25ed0 (Add an accelerator for the font dialog in the dialogs sample,
2022-04-16). Use Shift-Ctrl-J instead.

Closes #24324.
2024-02-16 00:29:47 +01:00
Blake Madden
3f7e1e8414 Add GetPanel(), GetPanelById() and GetPanelCount() to ribbon page
This provides parity with the ribbon bar's GetPage() set of functions,
and adds an easy way to find a panel and show/hide it.

Also, add example and discussion about showing/hiding panels on a
ribbon.

Closes #24319.
2024-02-16 00:26:33 +01:00
Lauri Nurmi
1864a49dd2 Fix dialogs sample never exiting with a persistent taskbar icon
If the latest user notification shown was shown with
"Use persistent taskbar icon" toggled on, the application process
would never really exit after closing. So delete m_taskbarIcon
in destructor.

Closes #24316.
2024-02-16 00:23:24 +01:00
DietmarSchwertberger
f27c199fa8 Fix drawing of drag-move insertion marker
At least under Windows this marker needs to be drawn from wxEVT_PAINT
handler too in order to be visible when double-buffering is used.

Closes #24310.

Closes #24314.
2024-02-16 00:21:00 +01:00
Vadim Zeitlin
57c5aff337 Update autoconf container instructions to use Docker registry
Recommend pulling the container from there instead of building it.

Also provide the (very slightly differing) instructions for using it
with podman.
2024-02-16 00:17:25 +01:00
Vadim Zeitlin
47b011c665 Merge branch 'qt-bgcol-fixes'
Make setting background colour in wxQt more consistent with the other
ports and fix it for wxSearchCtrl.

Closes #23170, #24315.
2024-02-13 22:03:35 +01:00
Alex Shvartzkop
9b97d3a308 Fix generic wxSearchCtrl background colour in wxQt
Set the background colour of the whole control to the text control
background colour.
2024-02-13 21:55:35 +01:00
Alex Shvartzkop
253cfa3a31 Use white background brush by default in wxQt too
Just as this is done in the other ports.

This commit is best viewed with Git --color-moved option.
2024-02-13 21:54:07 +01:00
Alex Shvartzkop
4be5fde721 Don't handle unset background colour as black in wxQt
Unset background colour actually means to use the default one, which is
still not the case for wxQt if the background had been previously
changed, but at the very least it doesn't change it to black any longer.

This commit is best viewed ignoring whitespace-only changes.
2024-02-13 21:49:53 +01:00
Vadim Zeitlin
4a5de60fa9 Merge branch 'wxqt-2' of https://github.com/dsa-t/wxWidgets
More miscellaneous wxQt fixes.

See #24309.
2024-02-13 21:43:48 +01:00
Vadim Zeitlin
19038ea58f Merge branch 'minor-pg-fixes'
Minor wxPropertyGrid fixes, notably fixing the expander buttons
appearance in high DPI under MSW.

See #24304.
2024-02-13 21:40:27 +01:00
Vadim Zeitlin
e00e6dcd81 Merge branch 'qt-msgdlg-ext'
Add support for extended messages and custom button labels to
wxMessageDialog in wxQt.

See #24243, #24299.
2024-02-13 21:38:43 +01:00
Vadim Zeitlin
01ffca369c Merge branch 'translation-lookup-fixes' of https://github.com/vslavik/wxWidgets
Restore correct translation language lookup taking into account message
IDs language correctly when it is present in the preferred UI languages
but is not the first language in them and other similar corner cases.

Also add unit tests verifying that this code logic, already changed many
times in the past, does behave correctly now.

See #24297.
2024-02-13 21:34:00 +01:00
Vadim Zeitlin
79ac049d74 Merge branch 'wxqt-1' of https://github.com/dsa-t/wxWidgets
Make wxGLCanvas work in wxQt and fix possible crashes in wxComboBox and
wxStatusBar in this port.

See #24200.
2024-02-13 21:29:24 +01:00
Vadim Zeitlin
d3731c86ed Merge branch 'aui_splitter_overlay'
Use wxOverlay to show sash feedback in wxAUI and in wxSplitterWindow to
implement non-live resizing in ports where it didn't work before (wxGTK3
with Wayland, wxOSX).

See #24193.
2024-02-13 21:23:47 +01:00
taler21
716bf59449 Ensure full label is shown after editing it in generic wxListCtrl
The list control needs to be updated after the user has edited an item
label because, for example, in icon view the column width and positions
of subsequent columns may change if the edited label is or was wider
than the icons and other labels in the column.

Closes #24311.
2024-02-13 21:17:07 +01:00
Blake-Madden
b12977cb75 Fix minor problems in wxWebRequest documentation
Add missing "true" and consistently use "@true" alias for it.

Reword explanation about what "peer verification" means.

Closes #24300.
2024-02-13 21:10:18 +01:00
Blake-Madden
4e03291de2 Only add padding for shown panels on ribbon
When laying out panels on a ribbon, don't add padding for panels that
won't be drawn and used in the layout calculations.

Closes #24296.
2024-02-13 21:09:25 +01:00
Václav Slavík
6d48acb5f3 Add unit tests for wxTranslations language lookup 2024-02-13 18:24:43 +01:00
Václav Slavík
1f658ff729 Override GetPreferredUILanguages with WXLANGUAGE
Add support for overriding GetPreferredUILanguages() return value by
setting the WXLANGUAGE environment variable to a colon-separated list
of desired languages (same as GNU's LANGUAGE variable).

Primarily used for unit tests, but may be more generally useful.
2024-02-13 18:23:06 +01:00
Václav Slavík
f248f0593c Clarify GetAvailableTranslations() return value
Add a note explaining that the msgid language is not included.
2024-02-13 16:12:57 +01:00
Václav Slavík
f0ed987010 Warn about a GetBestAvailableTranslation() quirk 2024-02-13 16:12:57 +01:00
Václav Slavík
1030147aff Fix AddAvailableCatalog() API
Knowing msgIdLanguage is necessary for correct evaluation of preferred
languages order; without it, it would be possible to load undesirable
translation file.

See 2af36e9560 for details.
2024-02-13 16:12:56 +01:00
Václav Slavík
2af36e9560 Partially revert "Add AddAvailableCatalog() and use it in AddStdCatalog()"
This commit partially reverts 94b1a17aeb.

The above commit changed translation lookup logic to differentiate
between msgid and "available" translations (the latter being loaded from
a file or resource). It first attempted to use available translations
and only felt back to msgid language as the last resort.

Unfortunately, doing that broke lookup in cases when the user had msgid
language as not-last preference in their UI languages list, or even when
a similar translation was available. For example:

- msgid=en, user preference [cs,en,fr], only fr.po available: fr would
  be used instead of en
- msgid=en_US or en, user preference [en], but en_GB.po available:
  British English would be used even for US users

This commit fixes this by restoring the previous behavior where msgid
language was treated as a first-class citizen in lookup, while
preserving the API that allows distinguishing between the two cases.

It also reimplements AddStdCatalog() in a more straightforward way that
doesn't rely on AddAvailableCatalog().
2024-02-13 16:12:38 +01:00
Vadim Zeitlin
acee397e4c Avoid implicit "this" capture in a lambda to avoid C++20 warning
Implicitly capturing "this" is deprecated in C++20, so do it explicitly,
even if it also requires explicitly capturing everything else as
combining implicit capture with explicitly capturing "this" is not
allowed in the previous C++ versions.
2024-02-13 02:39:56 +01:00
Vadim Zeitlin
4261e1d07d Erase overlay contents when resetting it in wxOSX
Without this, the old contents continues to be shown for some time
before the display was refreshed.
2024-02-13 01:00:48 +01:00
Vadim Zeitlin
0217f54894 Initialize wxOverlayImpl members in their declarations
Ensure that all member variables are initialized instead of initializing
just some of them in the ctor and leaving others uninitialized, it's
simpler to just do this rather than to check if uninitialized values can
or not be used.
2024-02-13 00:43:54 +01:00
Vadim Zeitlin
c4658ec8f2 Get rid of IsLive() helper in wxSplitterWindow code
This was useful when we had AlwaysUsesLiveResize() and the related
complications, but now that live resizing is governed solely by
wxSP_LIVE_UPDATE again, it's not needed any longer.

No real changes.
2024-02-12 22:27:25 +01:00
Vadim Zeitlin
7584c04ff8 Inline DrawResizeHint() function into its only caller
It seems to be more clear to just draw the sash in DrawSashTracker()
itself instead of calling a function which does it.
2024-02-12 22:25:39 +01:00
Vadim Zeitlin
c1325983cf Avoid using "x2" and "y2" for sash width and height
This was confusing, so get rid of these variables and use more clearly
named "posSash" and "sizeSash" instead.

No real changes.
2024-02-12 22:23:40 +01:00
Alex Shvartzkop
bff40b6cb6 Blend mask with alpha for wxCursor initialized from wxImage on wxQt. 2024-02-12 20:11:26 +03:00
Alex Shvartzkop
6aa928d624 Call base class in SetLabel for some widgets on wxQt. 2024-02-12 18:57:33 +03:00
Alex Shvartzkop
afa4294ef1 Support SetLabel/GetLabel for wxRadioBox/wxRadioButton on wxQt. 2024-02-12 18:57:33 +03:00
Alex Shvartzkop
7a0149dfcb Show popup menu at cursor on wxQt if needed. 2024-02-12 18:42:49 +03:00
Alex Shvartzkop
94e73dace5 Protect non-editable wxComboBox from nullptr on wxQt. 2024-02-12 15:34:56 +03:00
Alex Shvartzkop
8730858eae Fix wxStatusBar crash when calling GetFieldRect early on wxQt. 2024-02-12 15:34:56 +03:00
Alex Shvartzkop
966b6e9460 Improve wxQt OpenGL canvas implementation:
- Support wxGLContext::SetCurrent.
- Pass GL canvas attributes via ParseAttribList to handle defaults.
- Remove OpenGL not implemented message.
- Prevent QGLWidget from changing OpenGL state before we paint.
- Set Qt::StrongFocus for wxQtGLWidget to allow keyboard input.
- Use QtCanPaintWithoutActivePainter to fix wxPaintDCImpl assert when using wxGLCanvas.
2024-02-12 15:34:56 +03:00
Vadim Zeitlin
4b1a129f6f Give bigger initial size to the XRC window in propgrid sample
It was too small to show much of anything by default, especially in high
DPI.
2024-02-12 00:51:26 +01:00
Vadim Zeitlin
d445d79508 Don't leave a border around wxPropertyGrid in sample XRC file
This looks ugly under wxMSW where the frame doesn't have the same
background and isn't really necessary.
2024-02-12 00:50:35 +01:00
Vadim Zeitlin
770481613f Fix wxPropertyGrid expand buttons height in high DPI
It was too small, and twice (at 200% scaling) smaller than width,
resulting in tiny and ugly buttons.
2024-02-12 00:49:32 +01:00
Vadim Zeitlin
09fe965219 Add support for custom button labels to Qt wxMessageDialog
Just set the label if it's specified.
2024-02-11 13:53:24 +01:00