fix RTL positioning for View::Settings windows

pull/5/head
Michail Vourlakos 6 years ago
parent 8b3920ef64
commit bb3ef16dea

@ -246,9 +246,15 @@ void PrimaryConfigView::syncGeometry()
switch (m_latteView->formFactor()) {
case Plasma::Types::Horizontal: {
xPos = (m_complexity == Latte::Types::ExpertSettings) ?
availGeometry.x() + availGeometry.width() - size.width() :
scrGeometry.center().x() - size.width() / 2;
if (m_complexity == Latte::Types::ExpertSettings) {
if (qApp->isLeftToRight()) {
xPos = availGeometry.x() + availGeometry.width() - size.width();
} else {
xPos = availGeometry.x();
}
} else {
xPos = scrGeometry.center().x() - size.width() / 2;
}
if (location == Plasma::Types::TopEdge) {
yPos = scrGeometry.y() + clearThickness;

@ -183,7 +183,11 @@ void SecondaryConfigView::syncGeometry()
switch (m_latteView->containment()->formFactor()) {
case Plasma::Types::Horizontal: {
xPos = availGeometry.x() + secondaryConfigSpacing;
if (qApp->isLeftToRight()) {
xPos = availGeometry.x() + size.width();
} else {
xPos = availGeometry.x() + availGeometry.width() - size.width() - secondaryConfigSpacing;
}
if (location == Plasma::Types::TopEdge) {
yPos = scrGeometry.y() + clearThickness;

Loading…
Cancel
Save