aboutsummaryrefslogtreecommitdiff
path: root/lumina-config
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-14 07:47:23 -0400
committerKen Moore <ken@pcbsd.org>2015-03-14 07:47:23 -0400
commitdefe8efa266b3e9b70827220edb6d84fc95bb14b (patch)
treeac1aaee150874a7caac8b0a86a56efe578526865 /lumina-config
parentAdd the ability to set/use custom timezones on the system - defaulting to the... (diff)
downloadlumina-defe8efa266b3e9b70827220edb6d84fc95bb14b.tar.gz
lumina-defe8efa266b3e9b70827220edb6d84fc95bb14b.tar.bz2
lumina-defe8efa266b3e9b70827220edb6d84fc95bb14b.zip
Truncate the timezone country names to 20 characters. (more than enough to see what the country is)
Diffstat (limited to 'lumina-config')
-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