aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-config/mainUI.cpp6
-rw-r--r--lumina-config/mainUI.ui3
2 files changed, 7 insertions, 2 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp
index e5b277a9..ba254d9f 100644
--- a/lumina-config/mainUI.cpp
+++ b/lumina-config/mainUI.cpp
@@ -279,11 +279,13 @@ void MainUI::setupMenus(){
ui->combo_session_timezone->clear();
QList<QByteArray> TZList = QTimeZone::availableTimeZoneIds();
QDateTime DT = QDateTime::currentDateTime();
- QStringList tzlist;
+ QStringList tzlist; //Need to create a list which can be sorted appropriately
for(int i=0; i<TZList.length(); i++){
QTimeZone TZ(TZList[i]);
if(TZ.country()<=0){ continue; } //skip this one
- QString name = QString(tr("%1 (%2)")).arg(QLocale::countryToString(TZ.country()), TZ.abbreviation(DT));
+ QString name = QLocale::countryToString(TZ.country());
+ if(name.count() > 20){ name = name.left(20)+"..."; }
+ name = QString(tr("%1 (%2)")).arg(name, TZ.abbreviation(DT));
if(tzlist.filter(name).isEmpty()){
tzlist << name+"::::"+QString::number(i);
}
diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui
index 92ebf47d..07abacab 100644
--- a/lumina-config/mainUI.ui
+++ b/lumina-config/mainUI.ui
@@ -1649,6 +1649,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToMinimumContentsLength</enum>
+ </property>
</widget>
</item>
</layout>
bgstack15