diff options
-rw-r--r-- | helpers.h | 1 | ||||
-rw-r--r-- | qt-gui.cpp | 5 | ||||
-rw-r--r-- | qt-ui/simplewidgets.cpp | 3 |
3 files changed, 8 insertions, 1 deletions
@@ -33,6 +33,7 @@ QString get_dive_date_string(timestamp_t when); QString get_short_dive_date_string(timestamp_t when); QString get_trip_date_string(timestamp_t when, int nr); QString uiLanguage(QLocale *callerLoc); +QLocale getLocale(); void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsed); #if defined __APPLE__ diff --git a/qt-gui.cpp b/qt-gui.cpp index 23dc8b75f..4dc21e88f 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -103,6 +103,11 @@ QString uiLanguage(QLocale *callerLoc) return uiLang; } +QLocale getLocale() +{ + return loc; +} + void init_ui(void) { // tell Qt to use system proxies diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index e87f324de..e14e61552 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -295,10 +295,11 @@ DateWidget::DateWidget(QWidget *parent) : QWidget(parent), calendarWidget(new QCalendarWidget()) { setDate(QDate::currentDate()); - setMinimumSize(QSize(64,64)); + setMinimumSize(QSize(80,64)); setFocusPolicy(Qt::StrongFocus); calendarWidget->setWindowFlags(Qt::FramelessWindowHint); calendarWidget->setWindowFlags(Qt::WindowStaysOnTopHint); + calendarWidget->setFirstDayOfWeek(getLocale().firstDayOfWeek()); connect(calendarWidget, SIGNAL(activated(QDate)), calendarWidget, SLOT(hide())); connect(calendarWidget, SIGNAL(clicked(QDate)), calendarWidget, SLOT(hide())); |