mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
Process user-visible strings in TimezoneWidget and LocalePage.
This commit is contained in:
parent
0abd902090
commit
71851ed274
4 changed files with 41 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
|
@ -132,7 +132,7 @@ void TimeZoneWidget::paintEvent(QPaintEvent*) {
|
|||
painter.drawImage(point.x() - pin.width()/2, point.y() - pin.height()/2, pin);
|
||||
|
||||
// Draw text and box
|
||||
const int textWidth = fontMetrics.width(currentLocation.zone);
|
||||
const int textWidth = fontMetrics.width(LocaleGlobal::Location::pretty(currentLocation.zone));
|
||||
const int textHeight = fontMetrics.height();
|
||||
|
||||
QRect rect = QRect(point.x() - textWidth/2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2);
|
||||
|
@ -150,7 +150,7 @@ void TimeZoneWidget::paintEvent(QPaintEvent*) {
|
|||
painter.setBrush(QColor(40, 40, 40));
|
||||
painter.drawRoundedRect(rect, 3, 3);
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawText(rect.x() + 5, rect.bottom() - 4, currentLocation.zone);
|
||||
painter.drawText(rect.x() + 5, rect.bottom() - 4, LocaleGlobal::Location::pretty(currentLocation.zone));
|
||||
|
||||
painter.end();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue