Implement UI scaling and more (#501)
**New Features** * Runtime font accessors and new symbol fonts for text, launcher, statusbar, and shared icons. * Added font height base setting to device.properties * Text fonts now have 3 sizes: small, default, large **Improvements** * Renamed `UiScale` to `UiDensity` * Statusbar, toolbar and many UI components now compute heights and spacing from fonts/density. * SSD1306 initialization sequence refined for more stable startup. * Multiple image assets replaced by symbol-font rendering. * Many layout improvements related to density, font scaling and icon scaling * Updated folder name capitalization for newer style
This commit is contained in:
committed by
GitHub
parent
72c9b2b113
commit
9a11e6f47b
@@ -0,0 +1,39 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <tactility/error.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
const char* error_to_string(error_t error) {
|
||||
switch (error) {
|
||||
case ERROR_NONE:
|
||||
return "no error";
|
||||
case ERROR_UNDEFINED:
|
||||
return "undefined";
|
||||
case ERROR_INVALID_STATE:
|
||||
return "invalid state";
|
||||
case ERROR_INVALID_ARGUMENT:
|
||||
return "invalid argument";
|
||||
case ERROR_MISSING_PARAMETER:
|
||||
return "missing parameter";
|
||||
case ERROR_NOT_FOUND:
|
||||
return "not found";
|
||||
case ERROR_ISR_STATUS:
|
||||
return "ISR status";
|
||||
case ERROR_RESOURCE:
|
||||
return "resource";
|
||||
case ERROR_TIMEOUT:
|
||||
return "timeout";
|
||||
case ERROR_OUT_OF_MEMORY:
|
||||
return "out of memory";
|
||||
case ERROR_NOT_SUPPORTED:
|
||||
return "not supported";
|
||||
case ERROR_NOT_ALLOWED:
|
||||
return "not allowed";
|
||||
case ERROR_BUFFER_OVERFLOW:
|
||||
return "buffer overflow";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user