From 59398e4dd2ee0ed92f56a1b3dfbe81b0f6670ac0 Mon Sep 17 00:00:00 2001 From: natinusala Date: Tue, 12 Feb 2019 19:05:37 +0100 Subject: [PATCH] ozone: fix alignment --- menu/drivers/ozone/ozone.c | 40 ++++++++++++++--------------- menu/drivers/ozone/ozone.h | 52 +++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index c4448d93b1c..c71c113cc8e 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -345,11 +345,11 @@ static void ozone_context_reset(void *data, bool is_threaded) ozone->has_all_assets = true; fill_pathname_join(font_path, ozone->assets_path, "regular.ttf", sizeof(font_path)); - ozone->fonts.footer = menu_display_font_file(font_path, FONT_SIZE_FOOTER, is_threaded); - ozone->fonts.entries_label = menu_display_font_file(font_path, FONT_SIZE_ENTRIES_LABEL, is_threaded); + ozone->fonts.footer = menu_display_font_file(font_path, FONT_SIZE_FOOTER, is_threaded); + ozone->fonts.entries_label = menu_display_font_file(font_path, FONT_SIZE_ENTRIES_LABEL, is_threaded); ozone->fonts.entries_sublabel = menu_display_font_file(font_path, FONT_SIZE_ENTRIES_SUBLABEL, is_threaded); - ozone->fonts.time = menu_display_font_file(font_path, FONT_SIZE_TIME, is_threaded); - ozone->fonts.sidebar = menu_display_font_file(font_path, FONT_SIZE_SIDEBAR, is_threaded); + ozone->fonts.time = menu_display_font_file(font_path, FONT_SIZE_TIME, is_threaded); + ozone->fonts.sidebar = menu_display_font_file(font_path, FONT_SIZE_SIDEBAR, is_threaded); fill_pathname_join(font_path, ozone->assets_path, "bold.ttf", sizeof(font_path)); ozone->fonts.title = menu_display_font_file(font_path, FONT_SIZE_TITLE, is_threaded); @@ -372,27 +372,27 @@ static void ozone_context_reset(void *data, bool is_threaded) ozone->dimensions.entry_padding_horizontal_half = ENTRY_PADDING_HORIZONTAL_HALF * scale; ozone->dimensions.entry_padding_horizontal_full = ENTRY_PADDING_HORIZONTAL_FULL * scale; - ozone->dimensions.entry_padding_vertical = ENTRY_PADDING_VERTICAL * scale; - ozone->dimensions.entry_height = ENTRY_HEIGHT * scale; - ozone->dimensions.entry_spacing = ENTRY_SPACING * scale; - ozone->dimensions.entry_icon_size = ENTRY_ICON_SIZE * scale; - ozone->dimensions.entry_icon_padding = ENTRY_ICON_PADDING * scale; - - ozone->dimensions.sidebar_width = SIDEBAR_WIDTH * scale; - ozone->dimensions.sidebar_entry_height = SIDEBAR_ENTRY_HEIGHT * scale; - ozone->dimensions.sidebar_padding_horizontal = SIDEBAR_X_PADDING * scale; - ozone->dimensions.sidebar_padding_vertical = SIDEBAR_Y_PADDING * scale; - ozone->dimensions.sidebar_entry_padding_vertical = SIDEBAR_ENTRY_Y_PADDING * scale; - ozone->dimensions.sidebar_entry_icon_size = SIDEBAR_ENTRY_ICON_SIZE * scale; - ozone->dimensions.sidebar_entry_icon_padding = SIDEBAR_ENTRY_ICON_PADDING * scale; + ozone->dimensions.entry_padding_vertical = ENTRY_PADDING_VERTICAL * scale; + ozone->dimensions.entry_height = ENTRY_HEIGHT * scale; + ozone->dimensions.entry_spacing = ENTRY_SPACING * scale; + ozone->dimensions.entry_icon_size = ENTRY_ICON_SIZE * scale; + ozone->dimensions.entry_icon_padding = ENTRY_ICON_PADDING * scale; + + ozone->dimensions.sidebar_width = SIDEBAR_WIDTH * scale; + ozone->dimensions.sidebar_entry_height = SIDEBAR_ENTRY_HEIGHT * scale; + ozone->dimensions.sidebar_padding_horizontal = SIDEBAR_X_PADDING * scale; + ozone->dimensions.sidebar_padding_vertical = SIDEBAR_Y_PADDING * scale; + ozone->dimensions.sidebar_entry_padding_vertical = SIDEBAR_ENTRY_Y_PADDING * scale; + ozone->dimensions.sidebar_entry_icon_size = SIDEBAR_ENTRY_ICON_SIZE * scale; + ozone->dimensions.sidebar_entry_icon_padding = SIDEBAR_ENTRY_ICON_PADDING * scale; ozone->dimensions.cursor_size = CURSOR_SIZE * scale; /* Naive font size */ - ozone->title_font_glyph_width = FONT_SIZE_TITLE * 3/4; - ozone->entry_font_glyph_width = FONT_SIZE_ENTRIES_LABEL * 3/4; + ozone->title_font_glyph_width = FONT_SIZE_TITLE * 3/4; + ozone->entry_font_glyph_width = FONT_SIZE_ENTRIES_LABEL * 3/4; ozone->sublabel_font_glyph_width = FONT_SIZE_ENTRIES_SUBLABEL * 3/4; - ozone->sidebar_font_glyph_width = FONT_SIZE_SIDEBAR * 3/4; + ozone->sidebar_font_glyph_width = FONT_SIZE_SIDEBAR * 3/4; /* More realistic font size */ size = font_driver_get_message_width(ozone->fonts.title, "a", 1, 1); diff --git a/menu/drivers/ozone/ozone.h b/menu/drivers/ozone/ozone.h index 7eea03b8e80..ae51b90e831 100644 --- a/menu/drivers/ozone/ozone.h +++ b/menu/drivers/ozone/ozone.h @@ -29,40 +29,40 @@ typedef struct ozone_handle ozone_handle_t; #define OZONE_ENABLE_MOUSE 0 /* TODO: remove this define once it works */ -#define ANIMATION_PUSH_ENTRY_DURATION 10 -#define ANIMATION_CURSOR_DURATION 8 -#define ANIMATION_CURSOR_PULSE 30 +#define ANIMATION_PUSH_ENTRY_DURATION 10 +#define ANIMATION_CURSOR_DURATION 8 +#define ANIMATION_CURSOR_PULSE 30 -#define FONT_SIZE_FOOTER 18 -#define FONT_SIZE_TITLE 36 -#define FONT_SIZE_TIME 22 -#define FONT_SIZE_ENTRIES_LABEL 24 -#define FONT_SIZE_ENTRIES_SUBLABEL 18 -#define FONT_SIZE_SIDEBAR 24 +#define FONT_SIZE_FOOTER 18 +#define FONT_SIZE_TITLE 36 +#define FONT_SIZE_TIME 22 +#define FONT_SIZE_ENTRIES_LABEL 24 +#define FONT_SIZE_ENTRIES_SUBLABEL 18 +#define FONT_SIZE_SIDEBAR 24 #define HEADER_HEIGHT 87 #define FOOTER_HEIGHT 78 -#define ENTRY_PADDING_HORIZONTAL_HALF 60 -#define ENTRY_PADDING_HORIZONTAL_FULL 150 -#define ENTRY_PADDING_VERTICAL 20 -#define ENTRY_HEIGHT 50 -#define ENTRY_SPACING 8 -#define ENTRY_ICON_SIZE 46 -#define ENTRY_ICON_PADDING 15 - -#define SIDEBAR_WIDTH 408 -#define SIDEBAR_X_PADDING 40 -#define SIDEBAR_Y_PADDING 20 -#define SIDEBAR_ENTRY_HEIGHT 50 -#define SIDEBAR_ENTRY_Y_PADDING 10 -#define SIDEBAR_ENTRY_ICON_SIZE 40 -#define SIDEBAR_ENTRY_ICON_PADDING 15 +#define ENTRY_PADDING_HORIZONTAL_HALF 60 +#define ENTRY_PADDING_HORIZONTAL_FULL 150 +#define ENTRY_PADDING_VERTICAL 20 +#define ENTRY_HEIGHT 50 +#define ENTRY_SPACING 8 +#define ENTRY_ICON_SIZE 46 +#define ENTRY_ICON_PADDING 15 + +#define SIDEBAR_WIDTH 408 +#define SIDEBAR_X_PADDING 40 +#define SIDEBAR_Y_PADDING 20 +#define SIDEBAR_ENTRY_HEIGHT 50 +#define SIDEBAR_ENTRY_Y_PADDING 10 +#define SIDEBAR_ENTRY_ICON_SIZE 40 +#define SIDEBAR_ENTRY_ICON_PADDING 15 #define CURSOR_SIZE 64 -#define INTERVAL_BATTERY_LEVEL_CHECK (30 * 1000000) -#define INTERVAL_OSK_CURSOR (0.5f * 1000000) +#define INTERVAL_BATTERY_LEVEL_CHECK (30 * 1000000) +#define INTERVAL_OSK_CURSOR (0.5f * 1000000) struct ozone_handle {