Martchus
a7d2611400
Allow re-applying the default icon theme independently of palette
...
This is useful under Android where the palette is apparently not set to
something matching the darkmode setting but the Qt Quick Material style
nevertheless seems to follow the darkmode setting. So we just want to take
the darkmode setting into account for assigning the appropriate icon theme
and ignore the palette.
2024-03-31 13:42:38 +02:00
Martchus
63ffbc4a6f
Avoid warning after `QOperatingSystemVersion::OSType` was moved
...
This is now `QOperatingSystemVersionBase::OSType` causing a warning about
an implicit conversion. Making an explicit cast to whatever type
`os.type()` actually returns (depends on the Qt version) this warning does
not occur anymore and the code should still compile with any Qt version.
2024-03-15 23:54:17 +01:00
Martchus
010f5d8408
No longer enforce Fusion style on Windows 11 as of Qt 6.7
...
It looks like Qt 6.7 is going to provide a style for Windows 11 that will
fix the mentioned bug.
2023-12-15 15:56:09 +01:00
Martchus
adf64a3d0d
Apply clang-format
2023-11-18 22:05:36 +01:00
Martchus
c347bbfe1f
Fix compilation against Qt < 6.1
2023-10-29 21:23:01 +01:00
Martchus
458d98a279
Allow logging a few useful Qt-related information by setting env variable
...
Log Qt-related info when the environment variable
QT_UTILITIES_LOG_QT_CONFIG is set.
2023-10-14 20:44:59 +02:00
Martchus
dcc6f71f1e
Avoid unqualified `std` calls in `qtsettings.cpp`
2023-10-14 20:09:31 +02:00
Martchus
a1f50456e8
Use `QLocale::territory()` instead of deprecated `QLocale::country()`
2023-10-14 20:03:37 +02:00
Martchus
e448ff04fa
Apply clang-format
2023-07-03 00:26:25 +02:00
Martchus
c7426403e5
Allow configuring notice on localization option page individually
...
Whether an application can retranslate the UI dynamically likely differs
from whether the other appearance related settings can be applied
dynamically so this needs to be configurable individually.
Additionally, the environment settings can never be applied dynamically so
the notice on that page should always be shown.
2023-07-03 00:21:29 +02:00
Martchus
147b08ecf8
Retranslate tab texts in settings dialog dynamically
2023-07-02 23:54:55 +02:00
Martchus
0392b27b97
Add function for assigning a settings category name with retranslation
...
The function is still experimental as there's likely a better way to
implement this.
2023-07-02 23:54:14 +02:00
Martchus
f69ffec06c
Allow tracking whether the locale has changed via the `QtSettings` class
...
This allows an application to reload translations if the default locale has
changed to apply locale changes dynamically.
2023-07-02 23:48:46 +02:00
Martchus
dd99862769
Make the settings dialog react to language changes
...
This covers the settings dialog itself and option pages based on
`UiFileBasedOptionPage`. Other option pages need to react to the
new `OptionPageWidget::retranslationRequired()` signal or handle
the `QEvent::LanguageChange` event which is now propageted to the
page's widget.
2023-07-02 17:12:32 +02:00
Martchus
bc3f84e65d
Apply clang-format
2023-07-01 23:43:46 +02:00
Martchus
8d8585d00d
Allow to instantiate built-in option pages individually
...
Expose conversion from QtSettings to QtSettingsData so one can pass such
an object to the constructor of e.g. QtLanguageOptionPage.
2023-06-26 21:22:42 +02:00
Martchus
defecc45bc
Fix showing font dialog
2023-06-09 12:28:26 +02:00
Martchus
0e7c10e622
Apply clang-format
2023-06-08 15:33:15 +02:00
Martchus
3fffbc26e8
Fix selecting custom palette
...
For some reason the tool button's palette changes back to the old palette
when applying changes. So it cannot be used to hold the intermediately
selected paletted.
2023-06-08 13:28:35 +02:00
Martchus
92c643f5ff
Apply clang-format
2023-04-02 18:29:01 +02:00
Martchus
0ce5be5b2f
Use Fusion by default on Windows 11
...
The native Windows style doesn't look very nice
on Windows 11 so Fusion looks better in comparison,
see https://bugreports.qt.io/browse/QTBUG-97668 .
2023-03-28 23:42:13 +02:00
Martchus
63b33810e5
Allow disabling notices in Qt settings option pages
2023-03-26 21:24:43 +02:00
Martchus
bd1e603fcf
Improve behavior of `QtSettings::apply()` to be called multiple times
...
* Restore default settings
* Remove previously configured paths
2023-03-26 21:05:13 +02:00
Martchus
3e0754ebe5
Use fully qualified type in signal signature of `OptionCategory`
2023-03-26 19:51:50 +02:00
Martchus
f27288fb1f
Pass context object in lambda connections in `qtsettings.cpp`
2023-03-26 19:42:25 +02:00
Martchus
8642f14bb1
Apply clang-format and cmake-format
2023-03-25 18:50:08 +01:00
Martchus
41a1ede6fc
Improve handling style changes in custom dialog style
...
* Avoid using global palette when computing stylesheet
* Re-compute stylesheet on palette changes
2023-03-25 18:49:43 +01:00
Martchus
bbb65ae0dd
Add function to re-evaluate the palette and default icon theme
2023-03-23 22:40:42 +01:00
Martchus
647ad121a5
Improve setting default icon theme
...
* Set the default icon theme when applying Qt settings and the "system"
theme is supposed to be used but none could be determined by Qt
* Use a bundled icon theme depending on whether the current palette is
light or dark
* Apply the default not only under Windows anymore; supposedly this makes
sense under any platform where Qt cannot determine the icon theme for us
2023-03-15 21:27:04 +01:00
Martchus
e5bd602d91
Ensure environment settings are effective before applying other settings
...
At least the documentation of `QIcon::setThemeName()` sounds like it could
make a difference:
```
The name should correspond to a directory name in the themeSearchPath() …
```
2023-03-15 19:31:09 +01:00
Martchus
1dded32095
Avoid assigning wrong window icon to settings tab with no icon
...
* Reset the settings page's widget's parent so `windowIcon()` won't return
the parent's icon
* Improve the coding style a little bit
2023-02-11 16:21:19 +01:00
Martchus
ba16862d48
Allow selecting a settings page programmatically
2022-10-02 20:31:35 +02:00
Martchus
f81672885c
Make `apply()` and `reset()` slots of `SettingsDialog` public
2022-10-01 21:38:40 +02:00
Martchus
c91d73afc3
Allow adding additional widgets to the heading of the settings dialog
2022-08-27 15:02:16 +02:00
Martchus
58690920e4
Allow setting/getting corner widget in tab-widget of settings dialog
2022-08-23 18:43:28 +02:00
Martchus
885323e367
Add OptionPageWidget with `paletteChanged()` signal
2022-07-16 18:44:47 +02:00
Martchus
d4e35c28a3
Fix typo
2022-06-09 20:19:27 +02:00
Martchus
6564932b64
Fix applying selected custom font
2022-05-01 21:57:59 +02:00
Martchus
a2482ef37c
Avoid several warnings when building against Qt 6
2021-11-04 00:06:15 +01:00
Martchus
7765e6f062
Fix typos found via `codespell --skip .git -w`
2021-07-03 19:14:13 +02:00
Martchus
15075df0ca
Remove overspecification of Qt version in documentation and comments
2020-09-04 01:19:20 +02:00
Martchus
cb3a4960e7
Support Qt 6 (commit 174154b)
2020-09-04 00:44:48 +02:00
Martchus
5cb0d801ba
Improve coding style in optioncategorymodel.cpp
2019-08-10 22:03:13 +02:00
Martchus
e03b619b58
Add property for categories of OptionCategoryModel
2019-08-10 21:59:29 +02:00
Martchus
2772bad471
Improve parameter-passing in settings classes
...
* Pass QList by const ref
* Construct QList/QVector from initializer list
2019-08-10 21:56:53 +02:00
Martchus
9908190722
Use make_unique in qtsettings.cpp
2019-08-10 21:51:05 +02:00
Martchus
6d0d15bec2
Improve coding style if settingsdialog.cpp
...
* Reduce indentation
* Use const were possible
2019-08-10 21:50:29 +02:00
Martchus
c1746c4302
Use use instead of typedef in optionpage.h
2019-07-07 13:36:49 +02:00
Martchus
b3e7c390d9
Have everything in one top-level namespace
2019-06-10 21:57:46 +02:00
Martchus
8dc2956edf
Use override
2018-10-10 21:12:58 +02:00