mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Calendar Widget: set the locale appropriate first day of the week
Also adjust the minimum size, given I changed this in commit
26855234ac
("Make date widget easier to read").
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
48a3d1b79c
commit
0ea86d83c1
3 changed files with 8 additions and 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__
|
||||
|
|
|
@ -103,6 +103,11 @@ QString uiLanguage(QLocale *callerLoc)
|
|||
return uiLang;
|
||||
}
|
||||
|
||||
QLocale getLocale()
|
||||
{
|
||||
return loc;
|
||||
}
|
||||
|
||||
void init_ui(void)
|
||||
{
|
||||
// tell Qt to use system proxies
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Add table
Reference in a new issue