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 Sep 25, 2023
1 parent 7da4ff2 commit ea409d3
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -98,7 +98,8 @@ namespace {
" --isvfsenabled : whether to set a VFS or non-VFS folder (1 for 'yes' or 0 for 'no') when creating an account via command-line.\n"
" --remotedirpath : (optional) path to a remote subfolder when creating an account via command-line.\n"
" --serverurl : a server URL to use when creating an account via command-line.\n"
" --forcelegacyconfigimport : forcefully import account configurations from legacy clients (if available).\n";
" --forcelegacyconfigimport : forcefully import account configurations from legacy clients (if available).\n"
" --reverse : use a reverse layout direction.\n";

QString applicationTrPath()
{
Expand Down Expand Up @@ -724,6 +725,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
6 changes: 3 additions & 3 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ ApplicationWindow {
toolTipText: Style.ncTextColor
}

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

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

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 ea409d3

Please sign in to comment.