[calendar import]Fix months capitalization
Should be done by the view/label rather than hardocding it
This commit is contained in:
parent
b0f56eed9b
commit
6240b9e7d5
@ -172,13 +172,7 @@ QString Calendar::dayName(int weekday) const
|
||||
|
||||
QString Calendar::monthName() const
|
||||
{
|
||||
// Some CLDR (locale) data used by Qt have standalone months names
|
||||
// starting with lower-case letters. So if we want to provide consistent
|
||||
// look across locales, we need to capitalize it ourselves
|
||||
//
|
||||
// see https://bugreports.qt-project.org/browse/QTBUG-35100
|
||||
QString tmp = QDate::longMonthName(m_displayedDate.month(), QDate::StandaloneFormat);
|
||||
return tmp.left(1).toUpper() + tmp.mid(1);
|
||||
return QDate::longMonthName(m_displayedDate.month(), QDate::StandaloneFormat);
|
||||
}
|
||||
|
||||
int Calendar::year() const
|
||||
|
@ -41,7 +41,6 @@ Item {
|
||||
property int mHeight: theme.mSize(theme.defaultFont).height
|
||||
property int borderWidth: 1
|
||||
|
||||
|
||||
property int columns: monthCalendar.days
|
||||
property int rows: monthCalendar.weeks
|
||||
|
||||
@ -106,6 +105,7 @@ Item {
|
||||
level: 1
|
||||
text: monthCalendar.displayedDate.getFullYear() == new Date().getFullYear() ? root.selectedMonth : root.selectedMonth + ", " + root.selectedYear
|
||||
elide: Text.ElideRight
|
||||
font.capitalization: Font.Capitalize
|
||||
|
||||
Loader {
|
||||
id: menuLoader
|
||||
|
Loading…
Reference in New Issue
Block a user