Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2bdc47f7 authored by Safa AlFulaij's avatar Safa AlFulaij

Small RTL fixes with the OverlayWidget

Summary:
The detailed information widget isn't mirrored in RTL locales. This fix that.
It also use the Sunken shadow, which is not mirrored for RTL layouts. For now let's just
use Plain.

Reviewers: #kde_pim, mlaurent

Reviewed By: #kde_pim, mlaurent

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D9897
parent e77100e1
......@@ -257,7 +257,13 @@ void TransactionItem::addSubTransaction(ProgressItem *item)
ProgressDialog::ProgressDialog(QWidget *alignWidget, QWidget *parent)
: OverlayWidget(alignWidget, parent)
{
setFrameStyle(QFrame::Panel | QFrame::Sunken); // QFrame
// Qt Bug: Sunken is not applied for RTL layouts correctly (is not mirrored).
// For now let's just use Plain, which is fine for this.
if (layoutDirection() == Qt::LeftToRight) {
setFrameStyle(QFrame::Panel | QFrame::Sunken); // QFrame
} else {
setFrameStyle(QFrame::Panel | QFrame::Plain); // QFrame
}
setAutoFillBackground(true);
......
......@@ -70,8 +70,11 @@ void OverlayWidget::reposition()
}
// p is in the alignWidget's coordinates
QPoint p;
// We are always above the alignWidget, right-aligned with it.
p.setX(d->mAlignWidget->width() - width());
// We are always above the alignWidget, right-aligned with it for
// LTR locales, and left-aligned for RTL locales (default value=0).
if (layoutDirection() == Qt::LeftToRight) {
p.setX(d->mAlignWidget->width() - width());
}
p.setY(-height());
// Position in the toplevelwidget's coordinates
QPoint pTopLevel = d->mAlignWidget->mapTo(topLevelWidget(), p);
......
Markdown is supported
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