Commit graph

7032 commits

Author SHA1 Message Date
Vadim Zeitlin
6053381b34 Make keyboard sample window bigger on high DPI screens
Add missing FromDIP() when using hard-coded size.
2024-01-27 17:56:21 +01:00
Vadim Zeitlin
29caef7a5a Show pressed key category in the "keyboard" sample
Make it simple to check what does IsKeyInCategory() return for the
various keys.
2024-01-27 17:05:10 +01:00
ali kettab
9e61385878 Add wxRendererNative implementation for wxQt
Closes #24223.
2024-01-23 03:22:06 +01:00
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +01:00
Vadim Zeitlin
afc635f845 Merge branch 'aui-repaint'
Fix some wxAUI repaint problems and switch to using live resize
everywhere by default.

See #24166.
2024-01-10 18:43:24 +01:00
Vadim Zeitlin
4f666c227a Merge branches 'aui-close-on-all-fix', 'aui-current-after-drag', 'aui-hint', 'aui-tbar-realize' and 'aui-book-rm-current'
Merge miscellaneous AUI fixes and improvements.

See #24159, #24160, #24161, #24164, #24184.
2024-01-10 18:39:41 +01:00
Vadim Zeitlin
b294a6b2bc Merge branch 'config-xdg'
Make it easier to use wxFileConfig in XDG-compliant way.

See #24180.
2024-01-07 16:13:15 +01:00
Vadim Zeitlin
cfdfd14c59 Improve frame size in the listctrl sample
Make it bigger on high DPI displays and smaller on normal ones.
2024-01-07 00:35:39 +01:00
Artur Wieczorek
e2dcdb275b Use wxString() rather than wxEmptyString in propgrid sample 2024-01-06 22:43:01 +01:00
Artur Wieczorek
efa2870cb4 Rename wxPGKeyboardActions type to wxPGKeyboardAction
For regular enumeration singular name is more appropriate.
2024-01-06 22:42:55 +01:00
Artur Wieczorek
3cb3d62212 Use enum class to represent NumericType
This is for better type safety.
2024-01-06 22:42:49 +01:00
Artur Wieczorek
ca3acd7a03 Use enum class to implement wxPGPropValFormatFlags as bitmask
This is for better type safety of the flags.
2024-01-06 22:42:38 +01:00
Artur Wieczorek
031435bd39 Use dedicated function to obtain decimal separator in propgrid sample 2024-01-06 22:42:30 +01:00
Vadim Zeitlin
83d69a1cd9 Revert "Add debug postfix to libcef_dll_wrapper"
This reverts commit 3d51977acf because
it's incompatible with the library names created by CMake when building
CEF directly, and not via wx CMake files.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
486865b446 Add wxFileConfig::MigrateLocalFile()
This can be useful for the existing applications switching to using
XDG-compliant config files location as they can just call this function
on startup to keep using the existing file.
2024-01-04 03:23:37 +01:00
Vadim Zeitlin
acf113f3f9 Update copyright years to 2024
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-12-31 18:56:06 +01:00
Paul Cornett
ce1d317768 Remove GLU dependency
See #23721
2023-12-28 14:49:42 -08:00
Vadim Zeitlin
7a306c4a42 Merge branch 'qt-fixes' of https://github.com/AliKet/wxWidgets
Many wxQt improvements and simplifications.

See #24135.
2023-12-27 02:57:14 +01:00
Vadim Zeitlin
1d328aa4e1 Add wxSplitterWindow::AlwaysUsesLiveUpdate()
This is similar to wxAuiManager::AlwaysUsesLiveResize() and does the
same thing, i.e. returns true if live update is always used, whether
wxSP_LIVE_UPDATE is enabled or not.

Use the new function in the sample to disable the menu item in the
environments where it doesn't do anything, as it was confusing to have
it under e.g. Wayland.
2023-12-26 19:27:50 +01:00
ali kettab
de2762bc02 Fix compilation error in auidemo sample under wxQt
Also fix ID_NotebookNoCloseButton menu item ui update which causes
OnUpdateUI() handler to run forever under wxQt.
2023-12-26 12:45:52 +01:00
Maarten Bent
3d51977acf
Add debug postfix to libcef_dll_wrapper 2023-12-24 18:06:14 +01:00
Vadim Zeitlin
550849b786 Allow adding and deleting notebook tabs in the AUI sample
This is useful for testing that wxAuiNotebook updates correctly when
this is done.
2023-12-24 02:26:39 +01:00
Vadim Zeitlin
27585bf2c3 Hardcode minimal widget sample notebook size
Not doing this resulted in the window being tiny by default, so it's
better than nothing, even if it's clearly still not ideal.

See #24154.
2023-12-22 17:40:00 +01:00
ali kettab
7c592ba361 Make WidgetsPage pages scrollable in the widgets sample
Because some pages in the sample contain too much content to fit entirely
in the visible area of the page. Under wxQt port, this is true regardless
of the state of the window (whether it is maximized or not) some content
remains hidden and inaccessible.

Closes #24154.
2023-12-22 12:29:45 +01:00
Blake-Madden
a059061eb7 Replace wxDECLARE_NO_COPY_CLASS with deleted functions in samples
Use standard C++11 way of making classes non-copyable instead of
wx-specific macro.

Closes #24150.
2023-12-22 12:21:54 +01:00
Maarten Bent
948545ba81
Include helper ID in chromium helper plist
Same as the cefsimple example does.

CMake already has code to replace this variable.
2023-12-21 21:41:04 +01:00
Maarten Bent
5a2c45b8f7
Fix running webview sample with Chromium on macOS 2023-12-21 21:31:04 +01:00
Maarten Bent
6b6c5f5378
CMake: Fix building webview sample with Chromium
The macOS code is based on the cefsimple example in the cef distribution.
2023-12-21 21:27:14 +01:00
Vadim Zeitlin
bc19ed8387 Scale window size and splitter position by DPI in the sample
Make the window less tiny in high DPI under Windows and adjust the
initial splitter and drawing coordinates too.
2023-12-11 00:46:54 +01:00
Vadim Zeitlin
f667f765eb Initialize member variables in declaration in splitter sample
No real changes, just make things a bit simpler and safer.
2023-12-10 01:31:14 +01:00
ali kettab
5c46947c57 Fix wxStatusBar with field controls under wxQt
Postpone the creation of the QStatusBar fields until the first call to
SetStatusText(). This is to account for any field control added by the
user and also to avoid having to call UpdateFields() multiple times.

wxSTB_ELLIPSIZE_XXX and wxSTB_SHOW_TIPS supports are also implemented now.

The statbar sample is also updated: The OnSize() handler is removed because
it doesn't do much. that is: it is defined to keep the bitmap centered in the
status bar field it occupies if it is resized. but this is already done by the
wxStaticBitmap control, at least under wxMSW, wxGTK3 and wxQt.
2023-12-07 17:20:00 +01:00
ali kettab
2c9fee3d6f Add wxStatusBar::AddFieldControl() to simplify adding controls
This allows user codes to simply designate where their controls should
appear in the status bar without the need to handle wxEVT_SIZE
themselves.

They can still handle the event if the default positioning does not meet
their needs, but the new API is simpler and can be implemented for wxQt.

Closes #24092.
2023-12-05 00:39:04 +01:00
Vadim Zeitlin
6f501fd022 Merge branch 'qt-overlay' of https://github.com/AliKet/wxWidgets
Add native wxOverlay implementation under wxQt.

See #24080.
2023-12-03 15:00:34 +01:00
Vadim Zeitlin
e90817930a Merge branch 'master' into webview-chromium 2023-11-30 18:30:26 +01:00
Tim Eliseo
fce4941404 Add wxHAS_PREMULTIPLIED_ALPHA to abstract if wxBitmap pixels are premultiplied.
All previous relevant platform-specific tests have been changed to use this
symbol. Also, samples/image now premultiplies conditionally, correcting a
visual anomaly on wxGTK.
2023-11-26 13:23:52 -08:00
ali kettab
308f16d97b Fix caret sample under wxQt
wxQt has the same issue as wxOSX fixed here 21e02d5 (render characters
on OSX one by one as fractional widths leads to errors otherwise)
2023-11-23 22:49:15 +01:00
Paul Cornett
222883d98f Avoid Clang -Wcomma warnings
For the few cases that are not trivially avoidable,
use a cast to void to silence the warning.
2023-11-23 09:17:21 -08:00
Vadim Zeitlin
7a73044fd2 Merge branch 'tree-search'
Don't find hidden items when using incremental tree search.

See #24041.
2023-11-17 01:08:19 +01:00
Vadim Zeitlin
163d310369 Use wxTimer::StartOnce() instead of wxTIMER_ONE_SHOT
This is more readable and shorter, so encourage using this form.

No real changes.
2023-11-07 19:01:38 +01:00
Vadim Zeitlin
f9a22962e0 Add wxTreeCtrl::GetStateImageCount() and HasStateImages()
Add these functions for consistency with SetStateImages() and to avoid
using GetStateImageList() in the treectrl sample, which can now use
GetStateImageCount() instead.
2023-11-03 00:53:40 +01:00
Vadim Zeitlin
a5449a94a1 Add high DPI versions of state icons to the treectrl sample
This allows to check that the high DPI are really used in high DPI,
instead of scaled up versions of the smaller icons.
2023-11-03 00:53:40 +01:00
Vadim Zeitlin
308e902102 Add wxTreeCtrl::SetStateImages()
Unlike the existing SetStateImageList() function, the new one allows to
provide the high-resolution versions of the state images too.

Update the treectrl sample to use the new API.

Closes #23993.
2023-11-03 00:53:40 +01:00
Vadim Zeitlin
bc4a99d3c4 Fix initial size of treectrl sample window in high DPI
Adjust it to the DPI as it was way too small at 200% scaling.

Also stop passing parameters to MyFrame ctor, it's only used once so we
can just as well hardcode them in it to simplify things a little.
2023-11-03 00:53:40 +01:00
Vadim Zeitlin
188dc81d6e Extract custom wxBitmapBundleImpl in treectrl sample
No changes yet, just prepare for using this class in another function.

This commit is best viewed with Git --color-moved option.
2023-11-03 00:53:39 +01:00
Vadim Zeitlin
366d06847b Remove confusing boolean parameter from treectrl sample
Don't use CreateStateImageList(true) to delete the image list.

No real changes, just make the code more understandable.
2023-11-03 00:53:39 +01:00
PB
220031c0da Fix buttons missing in widgets sample after recent changes
The Clear log and Exit buttons were not shown after the changes
in a69fabe (Fix using wxStaticBoxSizer in samples, 2023-10-22).

Fix this by creating them with the proper parent.

Closes #24005.

Closes #24007.
2023-10-29 02:47:46 +02:00
PB
a69fabecb1 Fix using wxStaticBoxSizer in samples
If a control is contained in a wxStaticBoxSizer or its child sizer,
wxStaticBoxSizer::GetStaticBox() should be used as the control's parent.

However, widgets and dialogs samples did not do that, which resulted in
flooding the message log in widgets sample with warnings about this; in
dialogs sample the warnings were shown in the debug output.

Fix this by always using the static box as the control's parent when the
control is contained (directly or indirectly) in a wxStaticBoxSizer.

Closes #23967.
2023-10-22 01:27:55 +02:00
Vadim Zeitlin
e43f913313 Remove all blank "Modified by:" lines from top comment blocks
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.

Keep the non-blank lines for historical purposes.
2023-10-22 01:22:48 +02:00
Vadim Zeitlin
6f9f4c6dbe Call wxYield() while showing wxBusyInfo in the dialogs sample
Otherwise it can't be seen at all with wxGTK.
2023-10-03 16:28:55 +02:00
Vadim Zeitlin
95bd6d4cfa Suppress bogus GTK errors from wxNotebook in preferences sample
Call GTKAllowDiagnosticsControl() to let the code in wxNotebook
suppressing them have an effect.
2023-10-01 17:13:01 +02:00