BCalendarView: Adjust day name format to available space.

* Use BDateFormat::GetDayName() to fetch weekday names.
* Use appropriate symbol width(Mon, Mo, M) depending on the frame width.
* Provide functionality to update day name header in case of locale
preferences change.

Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
Akshay Agarwal
2017-09-01 20:20:06 +02:00
committed by Adrien Destugues
parent a222e4d0cc
commit 22d88eb415
2 changed files with 36 additions and 2 deletions
+3
View File
@@ -97,6 +97,7 @@ public:
bool IsDayNameHeaderVisible() const;
void SetDayNameHeaderVisible(bool visible);
void UpdateDayNameHeader();
bool IsWeekNumberHeaderVisible() const;
void SetWeekNumberHeaderVisible(bool visible);
@@ -151,6 +152,8 @@ private:
void _SetupDayNumbers();
void _SetupWeekNumbers();
void _PopulateDayNames(BDateFormatStyle style);
void _DrawDays();
void _DrawFocusRect();
void _DrawDayHeader();