Commit Graph

243 Commits

Author SHA1 Message Date
Martchus 9e4208fc0d Add simple view for showing ignore patterns 2024-05-05 14:47:50 +02:00
Martchus 131b4d1649 Use explicit c'tor in all Qt Widgets GUI related classes 2024-04-12 02:35:18 +02:00
Martchus 97f6cfcf76 Remove unused include in `helper.h` 2024-04-12 02:29:24 +02:00
Martchus 15b60102a1 Workaround Qt bug in Windows 11 style
Pass a widget when invoking `QStyle::drawControl()`; the Windows 11 style
uses the widget unconditionally.

Considering the documentation explicitly states `The widget argument is
optional` and the default value for the function argument is `nullptr` this
is supposedly a bug in Qt.
2024-04-12 02:29:02 +02:00
Martchus cc599efbef Fix potential problems with code related to styling the tray menu 2024-04-09 11:35:23 +02:00
Martchus 548251f538 Fix positioning issues with remote file browser 2024-04-06 19:38:54 +02:00
Martchus 93b5d66875 Allow browsing remote/global files 2024-04-05 01:30:00 +02:00
Martchus dee94844be Fix compilation with Qt < 6.6 2024-02-22 16:57:02 +01:00
Martchus 43caad8676 Ensure Fork Awesome icons are re-rendered on device pixel ratio change 2024-02-22 01:10:04 +01:00
Martchus da3ad3347d Fix remaining problems preventing unity builds to work
* Avoid multiple definitions of `centerObj()`; this was very bad anyway
* Include `c++utilities/tests/testutils.h` upfront so the formatting
  operators are included before CppUnit
2024-01-30 23:11:00 +01:00
Martchus 13ddb6dba5 Apply clang-format 2024-01-15 21:32:38 +01:00
Martchus 25971b6fd5 Update resource paths in UI file after folder structure has changed 2024-01-07 22:35:01 +01:00
Martchus 01fe57492c Add and update tab-stops explicitly where default order is wrong 2024-01-07 22:30:48 +01:00
Martchus c36b3223f1 Fix displaying issues with Windows 11 style
* Set content margins to take shadow effects into account
* Fix behavior when showing the QMenu not as `Qt::Popup`
    * Prevent polishing as it would wrongly override our window flags
    * Use the background color from the application's palette as the
      background color from the QMenu itself is changed by the Windows 11
      style
2023-12-25 00:48:29 +01:00
Martchus 59ec061580 Remove useless braces 2023-11-10 14:33:17 +01:00
Martchus 04a8905a83 Allow opening Syncthing directly when clicking on tray icon
This might be useful if minimalism is desired or to avoid positioning
issues on Wayland.
2023-11-10 14:33:03 +01:00
Martchus 784630104d Save position and size of window after is has been moved/resized
* Remember new size after user resized the window
* Remember new position after user repositioned window and using explicit
  coordinates has been configured in the appearance settings
2023-10-06 21:03:40 +02:00
Martchus cdfa769c84 Disable resizing/moving for popups under X11 as it is not working
At least it wasn't working with KWin and leading to the popup not closing
correctly anymore.
2023-10-06 17:55:51 +02:00
Martchus a9cc948099 Allow resizing/moving tray widget
This might be useful on Wayland where positioning the popup is otherwise
not possible at all. Combined with a session restoration mechanism this
might actually be a feasible workaround. The user just needed to position
the popup once wherever it is wanted to show up and then the compositor
could remember that position.

Especially the resizing would also be useful on other platforms (and is by
the way also already possible when using the Plasmoid showing it as part of
the system tray Plasmoid).
2023-10-06 17:05:40 +02:00
John Veness c2a0eee029 Change Directory to Folder in user-facing strings 2023-09-17 19:33:31 +01:00
Martchus abf1dd0748 Rename `SyncthingDeviceModel::IsOwnDevice` in accordance with recent UI changes 2023-09-16 23:09:48 +02:00
Martchus 5fa69e4f5a Rename `SyncthingDevStatus::OwnDevice` in accordance with UI change 2023-09-16 22:28:35 +02:00
Martchus 4effd6045b Dynamically retranslate some aspects of the UI
There are still many places missing but this is a first step.
2023-07-03 00:56:19 +02:00
Martchus 13730ab933 Ignore "Forbidden" errors shortly after Syncthing start
Not sure why I'm getting

```
Fehler beim Abfragen der Syncthing-Konfiguration: Error transferring http://127.0.0.1:8384/rest/system/config - server replied: Forbidden
URL der Anfrage: http://127.0.0.1:8384/rest/system/config
```

one one of my setups but this kind of error can likely be ignored shortly
after the start similar to other types of errors.
2023-06-30 12:43:06 +02:00
Martchus c6b03ae0aa Show "Connecting …" status via "Connect/Resume/Pause" button
This makes it more obvious that Syncthing Tray is currently connecting to
Syncthing (instead of just hiding the button completely).
2023-06-20 23:21:21 +02:00
Martchus 240155b534 Apply clang-format 2023-06-08 15:34:06 +02:00
Martchus 6a16333dfd Update statistics icons dynamically when color palette changes 2023-06-08 14:04:16 +02:00
Martchus 58b8a4e540 Allow showing Syncthing UI in Chromium-based browser in "app mode"
See https://github.com/Martchus/syncthingtray/issues/178
2023-03-27 20:28:52 +02:00
Martchus 9566623651 Apply Qt settings during runtime
It is no longer required to restart the application to change settings like
the widget style and palette.
2023-03-26 21:32:53 +02:00
Martchus 70e94bcd3c Re-evaluate the default icon theme when the color palette changes
So far the Plasmoid is not covered. It would likely not be very useful
anyways because under GNU/Linux the default icon theme can be determined
from the system and thus the "fallback" default this change is about is not
effective.
2023-03-23 22:43:59 +01:00
Martchus 1b72e61c86 Allow to use a window without titlebar
This might look better than a popup on Windows 11 because we'd still get
the round window corners.
2023-02-18 21:27:09 +01:00
Martchus 10c656cc5e Show error when settings cannot be restored or saved
* State the error type and location of the relevant file
* Help debugging problems related to settings
2023-02-17 19:20:10 +01:00
Martchus 4d96f791b6 Apply clang-format 2023-01-28 20:19:43 +01:00
Martchus 802937264b Simplify code by removing dialog parent 2023-01-28 18:35:50 +01:00
Martchus e9eeb76578 Fix displaying QR-code in wizard when built-in launcher is used
In this case the connection from the setup detection is not the correct
one. The connection used to apply the settings should generally be used for
querying the QR-code.
2023-01-09 16:01:37 +01:00
Martchus 4fc3777a9e Paint tray menu background as normal widget when shown as normal window 2022-12-10 12:07:06 +01:00
Martchus 24a9e63005 Apply clang-format 2022-12-10 12:06:07 +01:00
Martchus 66d485305b Avoid reference to concrete font (Noto Sans) 2022-12-06 21:36:14 +01:00
Martchus e3f230546d Adapt hack for context menu positioning issues to work in windowed mode 2022-11-29 23:41:18 +01:00
Martchus 6c89b2dc0a Allow disabling positioning at fallback coordinates
This just turns the "Otherwise assume …" label into a checkbox allowing to
disable the fallback behavior completely.
2022-11-29 23:33:28 +01:00
Martchus 71c56edfd8 Allow showing Syncthing Tray as normal application/window
* Remove experimental pinning feature again and instead allow using a
  normal window
    * Pinning made it inconvenient to close the (frameless) window again
    * Pinning required hiding/showing the window which didn't look very
      nice (and setting flags directly via `QWindow` didn't work as well)
* As normal application/window positioning issues on Wayland are less
  problematic (and those aren't going to be fixed any time soon, if at all)
2022-11-29 23:06:15 +01:00
Martchus 65c12ba4f8 Revert accidental changes to `traywidget.ui` 2022-10-09 12:20:30 +02:00
Martchus 127cd71856 Avoid re-positioning when pinning 2022-10-07 23:22:15 +02:00
Martchus ace27f9e9c Fix saving pinned state persistently 2022-10-07 23:15:25 +02:00
Martchus 9220d66add Allow pinning tray menu (still experimental) 2022-10-07 22:59:17 +02:00
Martchus d82bc710fd Allow using system icons instead of ForkAwesome icons
* Allow using icons from freedesktop.org icon theme for most ForkAwesome
  icons if available
* Let's not use it for the nested list of details in the models for now
* See https://github.com/Martchus/syncthingtray/issues/121
2022-10-07 00:20:50 +02:00
Martchus 4896261ef9 Allow opening launcher settings from wizard in case of an error to check logs 2022-10-02 20:33:07 +02:00
Martchus b0d1197cb7 Implement launcher and systemd configuration in wizard 2022-10-02 19:24:26 +02:00
Martchus bd5b93d311 Implement completion of wizard
Applying settings is still only implemented for one of the cases.
2022-10-01 22:25:33 +02:00
Martchus 442aee992a Unify code for showing wizard 2022-10-01 20:25:21 +02:00