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 Feb 2, 2022
1 parent f61a05d commit 315cb6a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gui/UserStatusSelectorDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Window {

flags: Qt.Dialog

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

UserStatusSelector {
Expand Down
5 changes: 4 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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 @@ -636,6 +637,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
5 changes: 5 additions & 0 deletions src/gui/tray/FileActivityDialog.qml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import QtQml 2.15
import QtQuick 2.15
import QtQuick.Window 2.15

import com.nextcloud.desktopclient 1.0 as NC
Expand All @@ -7,6 +9,9 @@ Window {

property alias model: activityModel

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

NC.FileActivityListModel {
id: activityModel
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Window {
color: "transparent"
flags: Systray.useNormalWindow ? Qt.Window : Qt.Dialog | Qt.FramelessWindowHint

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

property var fileActivityDialogAbsolutePath: ""
Expand Down

0 comments on commit 315cb6a

Please sign in to comment.