<commit_before>{-|
Module: Flaw.UI.Metrics
Description: Style and look-n-feel information.
License: MIT
-}

module Flaw.UI.Metrics
	( Metric
	, Position
	, Size
	, Rect
	, Metrics(..)
	, defaultMetrics
	) where

import Flaw.Math

-- | Base type for length values.
type Metric = Int
-- | Base type for two-dimensional position values.
type Position = Vec2 Metric
-- | Base type for two-dimensional length values.
type Size = Vec2 Metric
-- | Base type for rectangle (left, top, right, bottom).
type Rect = Vec4 Metric

-- | Set of "standard" metrics for UI.
data Metrics = Metrics
	{
	-- | Normal gap between elements.
	  metricsGap :: !Metric
	-- | Big gap between elements.
	, metricsBigGap :: !Metric
	-- | Frame client rect.
	, metricsFrameClient :: !Rect
	-- | Frame top border height.
	, metricsFrameTopBorder :: !Metric
	-- | Size of button.
	, metricsButtonSize :: !Size
	-- | Height of edit box.
	, metricsEditBoxHeight :: !Metric
	}

defaultMetrics :: Metrics
defaultMetrics = Metrics
	{ metricsGap = 10
	, metricsBigGap = 15
	, metricsFrameClient = Vec4 5 25 5 5
	, metricsFrameTopBorder = 5
	, metricsButtonSize = Vec2 100 30
	, metricsEditBoxHeight = 30
	}<commit_msg>change default ui metrics, add height of label<commit_after>{-|
Module: Flaw.UI.Metrics
Description: Style and look-n-feel information.
License: MIT
-}

module Flaw.UI.Metrics
	( Metric
	, Position
	, Size
	, Rect
	, Metrics(..)
	, defaultMetrics
	) where

import Flaw.Math

-- | Base type for length values.
type Metric = Int
-- | Base type for two-dimensional position values.
type Position = Vec2 Metric
-- | Base type for two-dimensional length values.
type Size = Vec2 Metric
-- | Base type for rectangle (left, top, right, bottom).
type Rect = Vec4 Metric

-- | Set of "standard" metrics for UI.
data Metrics = Metrics
	{
	-- | Normal gap between elements.
	  metricsGap :: !Metric
	-- | Big gap between elements.
	, metricsBigGap :: !Metric
	-- | Frame client rect.
	, metricsFrameClient :: !Rect
	-- | Frame top border height.
	, metricsFrameTopBorder :: !Metric
	-- | Size of button.
	, metricsButtonSize :: !Size
	-- | Height of edit box.
	, metricsEditBoxHeight :: !Metric
	-- | Height of label.
	, metricsLabelHeight :: !Metric
	}

defaultMetrics :: Metrics
defaultMetrics = Metrics
	{ metricsGap = 7
	, metricsBigGap = 10
	, metricsFrameClient = Vec4 5 25 5 5
	, metricsFrameTopBorder = 5
	, metricsButtonSize = Vec2 80 24
	, metricsEditBoxHeight = 24
	, metricsLabelHeight = 20
	}
{'fraction_non_alphanumeric': 0.10873080032336298, 'fraction_numerical': 0.01778496362166532, 'mean_word_length': 3.365079365079365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4522670', 'n_tokens_mistral': 821, 'n_tokens_neox': 786, 'n_words': 266}