From 4152fbecb6ee8360575aa4c24e9cedf822f159dc Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Wed, 25 Mar 2026 19:59:14 -0700 Subject: Implement vertical and horizontal layouts. Use widget position properly when rendering. Toolbar, buttons and edit bars WIP --- src/constants.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/constants.h') diff --git a/src/constants.h b/src/constants.h index 47babab..408e3d5 100644 --- a/src/constants.h +++ b/src/constants.h @@ -1,7 +1,17 @@ +/* Constants used throughout the library. + * + * All sizes are relative to the font size. Widths are relative to the font + * width; heights are relative to the font height. Other sizes are typically + * relative to font height. + */ #pragma once -// Maximum number of events that can be stored in a single input loop. +/// Maximum number of events that can be stored in a single input loop. #define MaxWidgetEvents 8 -// Width of scroll bars in pixels. +// TODO: Make this relative to the font width. +/// Width of scroll bars in pixels. #define ScrollbarWidth 32 + +/// Button border size relative to font height. +#define ButtonBorderSize 0.1 -- cgit v1.2.3