From 19a546e1ffffecc4e4fcf843de0621fe1ea4b7b4 Mon Sep 17 00:00:00 2001 From: Francisco Vallarino Date: Mon, 20 Sep 2021 19:36:16 -0300 Subject: [PATCH] Minor documentation updates --- src/Monomer/Core/Combinators.hs | 1 - src/Monomer/Widgets/Singles/Button.hs | 6 +++--- src/Monomer/Widgets/Singles/ExternalLink.hs | 6 +++--- src/Monomer/Widgets/Singles/Label.hs | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Monomer/Core/Combinators.hs b/src/Monomer/Core/Combinators.hs index 5fd023fd..318584cd 100644 --- a/src/Monomer/Core/Combinators.hs +++ b/src/Monomer/Core/Combinators.hs @@ -23,7 +23,6 @@ module Monomer.Core.Combinators where import Control.Lens (ALens') import Data.Text (Text) -import Monomer.Common import Monomer.Core.StyleTypes import Monomer.Core.WidgetTypes import Monomer.Event.Types diff --git a/src/Monomer/Widgets/Singles/Button.hs b/src/Monomer/Widgets/Singles/Button.hs index f31f8c43..fc82385c 100644 --- a/src/Monomer/Widgets/Singles/Button.hs +++ b/src/Monomer/Widgets/Singles/Button.hs @@ -50,15 +50,15 @@ Configuration options for button: - 'ellipsis': if ellipsis should be used for overflown text. - 'multiline': if text may be split in multiple lines. - 'maxLines': maximum number of text lines to show. +- 'resizeFactor': flexibility to have more or less spaced assigned. +- 'resizeFactorW': flexibility to have more or less horizontal spaced assigned. +- 'resizeFactorH': flexibility to have more or less vertical spaced assigned. - 'onFocus': event to raise when focus is received. - 'onFocusReq': 'WidgetRequest' to generate when focus is received. - 'onBlur': event to raise when focus is lost. - 'onBlurReq': 'WidgetRequest' to generate when focus is lost. - 'onClick': event to raise when button is clicked. - 'onClickReq': 'WidgetRequest' to generate when button is clicked. -- 'resizeFactor': flexibility to have more or less spaced assigned. -- 'resizeFactorW': flexibility to have more or less horizontal spaced assigned. -- 'resizeFactorH': flexibility to have more or less vertical spaced assigned. -} data ButtonCfg s e = ButtonCfg { _btnButtonType :: Maybe ButtonType, diff --git a/src/Monomer/Widgets/Singles/ExternalLink.hs b/src/Monomer/Widgets/Singles/ExternalLink.hs index 6f5ff904..6ed29f2d 100644 --- a/src/Monomer/Widgets/Singles/ExternalLink.hs +++ b/src/Monomer/Widgets/Singles/ExternalLink.hs @@ -46,15 +46,15 @@ Configuration options for externalLink: - 'ellipsis': if ellipsis should be used for overflown text. - 'multiline': if text may be split in multiple lines. - 'maxLines': maximum number of text lines to show. +- 'resizeFactor': flexibility to have more or less spaced assigned. +- 'resizeFactorW': flexibility to have more or less horizontal spaced assigned. +- 'resizeFactorH': flexibility to have more or less vertical spaced assigned. - 'onFocus': event to raise when focus is received. - 'onFocusReq': 'WidgetRequest' to generate when focus is received. - 'onBlur': event to raise when focus is lost. - 'onBlurReq': 'WidgetRequest' to generate when focus is lost. - 'onClick': event to raise when button is clicked. - 'onClickReq': 'WidgetRequest' to generate when button is clicked. -- 'resizeFactor': flexibility to have more or less spaced assigned. -- 'resizeFactorW': flexibility to have more or less horizontal spaced assigned. -- 'resizeFactorH': flexibility to have more or less vertical spaced assigned. -} data ExternalLinkCfg s e = ExternalLinkCfg { _elcLabelCfg :: LabelCfg s e, diff --git a/src/Monomer/Widgets/Singles/Label.hs b/src/Monomer/Widgets/Singles/Label.hs index e9115262..4140673b 100644 --- a/src/Monomer/Widgets/Singles/Label.hs +++ b/src/Monomer/Widgets/Singles/Label.hs @@ -133,8 +133,8 @@ instance CmbResizeFactorDim (LabelCfg s e) where labelCurrentStyle :: (WidgetEnv s e -> WidgetNode s e -> StyleState) -> LabelCfg s e -labelCurrentStyle style = def { - _lscCurrentStyle = Just style +labelCurrentStyle styleFn = def { + _lscCurrentStyle = Just styleFn } data LabelState = LabelState {