Discovered on Windows in conjunction with PAC scripts:
- Already configured accounts worked
- Fresh client account setup did not work
Reason:
- Proxy was reset over and over again in Account::setCredentials
Signed-off-by: Michael Schuster <michael@schuster.ms>
In case the default color value will ever change, this
commit makes sure that the colors of the menu border and
the menu separator coincide.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The lightgray menu border color #ededed introduced in
commit f147e5a66f (by PR #2095)
is way too light for my display (and probably others).
Thus the menus have no clear border which looks odd and broken.
This commit simply darkens the menu border to #bdbdbd, which
coincides with the (current default) color of the menu separator.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Build failed on Windows, missing libsync export for printQNetworkProxy after
moving ClientProxy class from gui to libsync.
Signed-off-by: Michael Schuster <michael@schuster.ms>
The format in the client log was: 3://host:port
Now it is shown like: HttpProxy://host:port
The old ID display was confusing and misleading users (and people debugging it ;p)
Signed-off-by: Michael Schuster <michael@schuster.ms>
Previously we were showing up the settings dialog but it doesn't quite
make sense anymore now that we got two dialogs.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Note this won't work on all platforms. KDE Plasma and GNOME Shell (with
systray extension) assume that right click is necessarily for a context
menu exposed via D-Bus, there's not nice way to make the right click
popup the main dialog on those platforms.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
We were calling accountState() on a "folder" member which could be
nullptr. In fact this would happen any time one right click on a file
outside of a sync dir under Windows, this thus led to a crash.
Since the capabilities variable was unused anyway, we just removed it.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
We then get more items clickable, in particular the bottom one proposing
to open the activity application. Now we can click it and it opens the
activity application straight away.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This led to blurry icons. Now use a fixed size of 32 which also makes
them a bit more pleasing... at least to me. ;-)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
For the "Activity" type activities, displayPath contains the file name
which is also in the subject. This was redundant, so now we don't
display an info line at all for that type of activities.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Context properties are deprecated and will be removed in Qt 6.
QML singletons are the better option here, especially given that
UserModel and UserAppsModel already are singletons.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Deduplicate the Button code by moving it into a separate file.
Also use the same background code for the apps button since as far as I can tell it didn't behave any different
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Seems like Qt sometimes doesn't like the QML window's screen property to be set
to a C++ (QVariant) pointer value, so we use the index: Qt.application.screens[]
See Qt docs: https://doc.qt.io/qt-5/qml-qtquick-window-window.html#screen-prop
This fix returns the matching window's index from the QGuiApplication::screens()
list to the QML side, instead of the window pointer.
Steps to reproduce the crash with the previous code:
- Open the Tray menu and close it a few times,
or scroll randomly up and down in its activity list.
Tested with Qt 5.12.5
Signed-off-by: Michael Schuster <michael@schuster.ms>
This leads to simplifying the computation code quite a bit as well.
Indeed we're separating concern between what is window size dependent or
not and that shows.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This was leading to the same logic being duplicated several times. It's
fine to return the QScreen* on the QML side directly but wrapped into a
QVariant.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
The API is just more convenient there, the rect and point types on the
QML side are just pale shadow of their C++ counterparts.
Also improved a bit the constness of the Systray class.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
The top left corner of that screenRect is (0,0) or based on
(virtualX,virtualY) depending on the platform. This leads to easier
reduction in code duplication.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>