Commit 1a0150d7 authored by Jan Blackquill's avatar Jan Blackquill 🌈 Committed by Nate Graham
Browse files

folderview: make menu entries less ambiguous

Without clear expectations, 'Columns' and 'Rows' are kinda meaningless to
users, since users from different backgrounds will form different expectations
as to what their behaviour will be, e.g. users that have used design software may
be used to selecting five items and selecting 'Layout > Columns', which would turn
that into five columns of one item each, while users that use different software
(or GUI layouts) would expect that would create one column of five items.

In short: users have contradictory expectations if we use 'Columns' and 'Rows' as the
UI strings here, so let's use something less contradictory.

BUG: 455770
parent 6bfef995
Pipeline #197089 passed with stage
in 4 minutes and 47 seconds
......@@ -128,8 +128,12 @@ Item {
Kirigami.FormData.label: i18n("Arrangement:")
model: [i18nc("@item:inlistbox arrangement of icons", "Rows"),
i18nc("@item:inlistbox arrangement of icons", "Columns")]
model: [
Qt.application.layoutDirection == Qt.LeftToRight ?
i18nc("@item:inlistbox arrangement of icons", "Left to Right") :
i18nc("@item:inlistbox arrangement of icons", "Right to Left"),
i18nc("@item:inlistbox arrangement of icons", "Top to Bottom"),
]
}
ComboBox {
......
......@@ -7,6 +7,7 @@
#include "viewpropertiesmenu.h"
#include <QActionGroup>
#include <QApplication>
#include <QMenu>
#include <KDirModel>
......@@ -63,14 +64,16 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent)
m_iconSize->addAction(action);
}
m_arrangementMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("object-rows")), i18n("Arrange In"));
m_arrangementMenu = m_menu->addMenu(QIcon::fromTheme(QStringLiteral("object-rows")), i18nc("@item:inmenu arrangement of icons", "Arrange"));
m_arrangement = new QActionGroup(this);
connect(m_arrangement, &QActionGroup::triggered, this, &ViewPropertiesMenu::arrangementChanged);
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "Rows"));
const auto isLtR = qApp->layoutDirection() == Qt::LeftToRight;
action = m_arrangementMenu->addAction(isLtR ? i18nc("@item:inmenu arrangement of icons", "Left to Right")
: i18nc("@item:inmenu arrangement of icons", "Right to Left"));
action->setCheckable(true);
action->setData(0);
m_arrangement->addAction(action);
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "Columns"));
action = m_arrangementMenu->addAction(i18nc("@item:inmenu arrangement of icons", "Top to Bottom"));
action->setData(1);
action->setCheckable(true);
m_arrangement->addAction(action);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment