Scale preview padding in UITheme metrics
Apply scaling to previewPadding metric while keeping previewHeightPercent intentionally unscaled. Adds clarifying comment about the different scaling behavior between these two preview-related metrics.
This commit is contained in:
@@ -40,6 +40,9 @@ ThemeMetrics scaleThemeMetrics(const ThemeMetrics& b, float s) {
|
||||
m.batteryBarHeight = sp(b.batteryBarHeight, s);
|
||||
m.headerHeight = sp(b.headerHeight, s);
|
||||
m.verticalSpacing = sp(b.verticalSpacing, s);
|
||||
// previewPadding is a pixel inset (font preview pane); scaled. previewHeightPercent is a
|
||||
// percent of the usable height and is intentionally NOT scaled.
|
||||
m.previewPadding = sp(b.previewPadding, s);
|
||||
m.contentSidePadding = sp(b.contentSidePadding, s);
|
||||
m.listRowHeight = sp(b.listRowHeight, s);
|
||||
m.listWithSubtitleRowHeight = sp(b.listWithSubtitleRowHeight, s);
|
||||
|
||||
@@ -110,7 +110,7 @@ struct ThemeMetrics {
|
||||
// Expected sizeof(ThemeMetrics), in bytes. scaleThemeMetrics() static_asserts
|
||||
// against this so a new/removed metric field can't slip through unclassified;
|
||||
// update it after adding a field (and decide there whether the field scales).
|
||||
inline constexpr unsigned THEME_METRICS_SIZEOF = 216;
|
||||
inline constexpr unsigned THEME_METRICS_SIZEOF = 224;
|
||||
|
||||
enum UIIcon { None = 0, Folder, Text, Image, Book, File, Settings, Transfer, Library, Wifi, Hotspot, Bookmark, Firmware };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user