Commit Graph

73 Commits

Author SHA1 Message Date
Martchus ded20b34a6 Add helper to react to darkmode changes 2024-03-31 22:48:22 +02:00
Martchus 92c643f5ff Apply clang-format 2023-04-02 18:29:01 +02:00
Martchus 121d6a10db Fix return type of `dialogStyleForPalette()` for Windows implementation 2023-03-26 19:37:13 +02: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 9f4c7a8aaa Use `PLATFORM_WINDOWS` (and not `PLATFORM_MINGW`) in conversion functions
Whether MinGW (or MSVC) is used shouldn't make a difference here. The code
using these functions generally sticks to UTF-8 on Windows.
2023-03-15 21:29:14 +01:00
Martchus fd151995ce Adapt to dark mode support in Qt 6.5
* Avoid setting platform setting in Qt 6.5 as it is no longer needed for
  dark Window frames
* Reference recent blog post
* Add real `isDarkModeEnabled()` function using new Qt 6.5 API (as existing
  `isPaletteDark()` function is only based on the current palette)
2023-03-13 20:59:57 +01:00
Martchus a051af49ae Avoid warning about unqualified std cast 2022-11-04 16:50:33 +01:00
Martchus 1b5fc13475 Add fallback for `qEnvironmentVariable()` to support older Qt versions 2022-10-29 21:34:47 +02:00
Martchus 0f7a4eb059 Add function to determine whether palette is dark 2022-07-16 18:44:47 +02:00
Martchus 1c0d6f166c Infer type of midRef's 3rd argument to be equivalent to the 2nd arg type 2021-11-04 00:15:24 +01: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 144cec5562 Apply clang-format 2021-04-06 17:50:22 +02:00
Martchus 0c07bdb10c Consider window frame size within centerWidgetAvoidingOverflow() 2021-03-24 21:24:15 +01:00
Martchus 3da940fe5b Add function to center a widget avoiding overflow 2021-03-24 14:42:56 +01:00
Martchus abb9f5790a Add qstringFromStdStringView() 2021-03-20 21:02:37 +01:00
Martchus 25062fcf01 Fix/silence warnings 2021-03-20 21:02:00 +01:00
Martchus d6ea2ac378 Apply cmake-format and clang-format 2020-12-20 17:56:35 +01:00
Martchus cb3a4960e7 Support Qt 6 (commit 174154b) 2020-09-04 00:44:48 +02:00
Martchus 65a532d80c Apply clang-format 2020-07-12 21:18:00 +02:00
Martchus 37bbad572d Avoid duplicate notifications when show() is called again very fast 2020-06-23 01:59:31 +02:00
Martchus 8ee82c9a3c Fix initializing alignment; this shouldn't use nullptr 2020-06-11 21:49:21 +02:00
Martchus 4ce6bb9487 Don't delete DBusNotification on error
Not sure why the deletion was done at this point in the
first place. DBusNotification objects are not even created
using 'new' by Syncthing Tray so this can never make any
sense.
2020-03-01 20:44:01 +01:00
Martchus 6874917c5d Use consistent order for visibility attribute 2020-01-29 18:33:27 +01:00
Martchus 358a7341b0 Fix support for Qt < 5.14.0 2019-12-16 16:52:35 +01:00
Martchus 67165b69d7 Don't use toSet() method which was deprecated in Qt 5.14.0 2019-12-15 19:29:03 +01:00
Martchus 1155ab0036 Use QFileInfo to check for absolute path in openLocalFileOrDir()
Better not rely on a correct implmentation of std::filesystem in
libstdc++ on Windows when using Qt anyways.
2019-10-09 17:33:38 +02:00
Martchus df03b97ced Fix openLocalFileOrDir() on Windows
Not tested yet
2019-10-09 12:54:35 +02:00
Martchus 9ba1aa32cf Protect pending DBusNotifications from concurrent access 2019-08-03 16:26:54 +02:00
Martchus 7cf1a57368 Don't rely on QCursor::pos() in dialog utils
It might not work under Wayland.
2019-07-20 18:38:39 +02:00
Martchus 4e3aaee223 Improve DBusNotification
* Allow setting application name
* Add more functions for hints
* Add return value to hide()
2019-06-16 17:35:31 +02:00
Martchus b3e7c390d9 Have everything in one top-level namespace 2019-06-10 21:57:46 +02:00
Martchus 303d9ae779 Add override to DBusNotification 2019-05-28 21:33:24 +02:00
Martchus 2ae98f8ba4 Prevent using deprecated Qt features 2019-05-04 22:16:46 +02:00
Marius Kittler fa53b13f73 Fix typo occured -> occurred 2018-07-23 14:45:16 +02:00
Marius Kittler 7472ddc5af Improve coding style 2018-07-11 13:16:57 +02:00
Martchus aa300b237f Use const in generateWindowTitle() 2018-05-23 23:20:01 +02:00
Martchus 1b0cdc9878 Fix DBusNotification::image()
It is not possible to extract data from the QDBusArgument
anymore. So let's just make the NotificationImage become a
QDBusArgument itself and add it directly as hint.
2018-05-02 00:53:32 +02:00
Martchus 2525c37f00 Fix documentation of NotificationImage 2018-04-26 00:12:59 +02:00
Marius Kittler dc799fb606 Include functional explicitely 2018-04-05 12:03:01 +02:00
Martchus 6727f97ac6 Allow querying capabilities of DBus notification daemon 2018-03-31 23:35:39 +02:00
Martchus f76d4044aa Support setting image and image path of DBus notifications 2018-03-18 03:07:03 +01:00
Martchus afe3373896 Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:45:49 +02:00
Martchus d441590274 Add documentation about D-Bus notification actions 2017-08-20 02:03:21 +02:00
Martchus 0599eb354d Apply clang-format 2017-05-04 22:46:37 +02:00
Martchus 2dcbc02f4b Apply clang-format 2017-05-01 03:16:25 +02:00
Martchus 61a544d42f Make definitions for gui support project specific 2017-04-27 22:03:37 +02:00
Martchus ad6f040881 Fix typo 2017-03-01 18:20:14 +01:00
Martchus 783c00b78c Fix handling special chars like # in openLocalFileOrDir() 2016-12-27 20:22:20 +01:00
Martchus 60403202df Add function to convert QString to native filename 2016-12-21 00:51:11 +01:00