Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
add --reverse option on command line

add support in one more qml window

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Oct 1, 2022
1 parent a320f74 commit c7e64b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ namespace {
" --logflush : flush the log file after every write.\n"
" --logdebug : also output debug-level messages in the log.\n"
" --confdir <dirname> : Use the given configuration folder.\n"
" --background : launch the application in the background.\n";
" --background : launch the application in the background.\n"
" --reverse : use a reverse layout direction.\n";

QString applicationTrPath()
{
Expand Down Expand Up @@ -648,6 +649,8 @@ void Application::parseOptions(const QStringList &options)
_backgroundMode = true;
} else if (option == QLatin1String("--version") || option == QLatin1String("-v")) {
_versionOnly = true;
} else if (option == QLatin1String("--reverse")) {
setLayoutDirection(layoutDirection() == Qt::LeftToRight ? Qt::RightToLeft : Qt::LeftToRight);
} else if (option.endsWith(QStringLiteral(APPLICATION_DOTVIRTUALFILE_SUFFIX))) {
// virtual file, open it after the Folder were created (if the app is not terminated)
QTimer::singleShot(0, this, [this, option] { openVirtualFile(option); });
Expand Down
3 changes: 3 additions & 0 deletions src/gui/tray/FileActivityDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Window {

property alias model: activityModel

LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

NC.FileActivityListModel {
id: activityModel
}
Expand Down
6 changes: 3 additions & 3 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ ApplicationWindow {

property int fileActivityDialogObjectId: -1

LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLef
LayoutMirroring.childrenInherit: true

readonly property int maxMenuHeight: Style.trayWindowHeight - Style.trayWindowHeaderHeight - 2 * Style.trayWindowBorderWidth

function openFileActivityDialog(objectName, objectId) {
Expand All @@ -34,6 +31,9 @@ ApplicationWindow {
fileActivityDialogLoader.refresh();
}

LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

Component.onCompleted: Systray.forceWindowInit(trayWindow)

// Close tray window when focus is lost (e.g. click somewhere else on the screen)
Expand Down

0 comments on commit c7e64b6

Please sign in to comment.