mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[kandinsky] Move to KDFont
This commit is contained in:
committed by
LeaNumworks
parent
29882768bd
commit
f8beae3b86
@@ -66,9 +66,9 @@ void BatteryTestController::updateBatteryState(float batteryLevel, bool batteryC
|
||||
|
||||
BatteryTestController::ContentView::ContentView() :
|
||||
SolidColorView(KDColorWhite),
|
||||
m_batteryStateView(KDText::FontSize::Large),
|
||||
m_batteryLevelView(KDText::FontSize::Small),
|
||||
m_batteryChargingView(KDText::FontSize::Small)
|
||||
m_batteryStateView(KDFont::LargeFont),
|
||||
m_batteryLevelView(KDFont::SmallFont),
|
||||
m_batteryChargingView(KDFont::SmallFont)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void BatteryTestController::ContentView::setColor(KDColor color) {
|
||||
|
||||
void BatteryTestController::ContentView::layoutSubviews() {
|
||||
m_batteryStateView.setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height/2));
|
||||
KDSize textSize = KDText::charSize(KDText::FontSize::Small);
|
||||
KDSize textSize = KDFont::SmallFont->glyphSize();
|
||||
m_batteryLevelView.setFrame(KDRect(0, Ion::Display::Height-2*textSize.height(), Ion::Display::Width, textSize.height()));
|
||||
m_batteryChargingView.setFrame(KDRect(0, Ion::Display::Height-textSize.height(), Ion::Display::Width, textSize.height()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user