mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-11-10 11:21:50 +03:00
Minor adjustments to default theme
This commit is contained in:
parent
45acdbe7bb
commit
cb5dd9768f
@ -37,8 +37,8 @@ instance Default Theme where
|
||||
data ThemeState = ThemeState {
|
||||
_thsFgColor :: Color,
|
||||
_thsHlColor :: Color,
|
||||
_thsText :: TextStyle,
|
||||
_thsEmptyOverlay :: StyleState,
|
||||
_thsTextStyle :: TextStyle,
|
||||
_thsEmptyOverlayStyle :: StyleState,
|
||||
_thsBtnStyle :: StyleState,
|
||||
_thsBtnMainStyle :: StyleState,
|
||||
_thsCheckboxStyle :: StyleState,
|
||||
@ -84,14 +84,14 @@ instance Default ThemeState where
|
||||
def = ThemeState {
|
||||
_thsFgColor = def,
|
||||
_thsHlColor = def,
|
||||
_thsText = def,
|
||||
_thsEmptyOverlay = def,
|
||||
_thsTextStyle = def,
|
||||
_thsEmptyOverlayStyle = def,
|
||||
_thsBtnStyle = def,
|
||||
_thsBtnMainStyle = def,
|
||||
_thsCheckboxStyle = def,
|
||||
_thsCheckboxWidth = def,
|
||||
_thsCheckboxWidth = 20,
|
||||
_thsDialStyle = def,
|
||||
_thsDialWidth = def,
|
||||
_thsDialWidth = 50,
|
||||
_thsDialogFrameStyle = def,
|
||||
_thsDialogTitleStyle = def,
|
||||
_thsDialogCloseIconStyle = def,
|
||||
@ -110,7 +110,7 @@ instance Default ThemeState where
|
||||
_thsListViewItemStyle = def,
|
||||
_thsListViewItemSelectedStyle = def,
|
||||
_thsRadioStyle = def,
|
||||
_thsRadioWidth = def,
|
||||
_thsRadioWidth = 20,
|
||||
_thsScrollOverlay = False,
|
||||
_thsScrollFollowFocus = True,
|
||||
_thsScrollBarColor = def,
|
||||
@ -120,9 +120,9 @@ instance Default ThemeState where
|
||||
_thsScrollThumbRadius = 0,
|
||||
_thsScrollWheelRate = 10,
|
||||
_thsSliderStyle = def,
|
||||
_thsSliderRadius = def,
|
||||
_thsSliderThumbFactor = def,
|
||||
_thsSliderWidth = def,
|
||||
_thsSliderRadius = Nothing,
|
||||
_thsSliderThumbFactor = 1.25,
|
||||
_thsSliderWidth = 10,
|
||||
_thsTooltipStyle = def,
|
||||
_thsUserStyleMap = M.empty
|
||||
}
|
||||
@ -131,8 +131,8 @@ instance Semigroup ThemeState where
|
||||
(<>) t1 t2 = ThemeState {
|
||||
_thsFgColor = _thsFgColor t2,
|
||||
_thsHlColor = _thsHlColor t2,
|
||||
_thsText = _thsText t1 <> _thsText t2,
|
||||
_thsEmptyOverlay = _thsEmptyOverlay t1 <> _thsEmptyOverlay t2,
|
||||
_thsTextStyle = _thsTextStyle t1 <> _thsTextStyle t2,
|
||||
_thsEmptyOverlayStyle = _thsEmptyOverlayStyle t1 <> _thsEmptyOverlayStyle t2,
|
||||
_thsBtnStyle = _thsBtnStyle t1 <> _thsBtnStyle t2,
|
||||
_thsBtnMainStyle = _thsBtnMainStyle t1 <> _thsBtnMainStyle t2,
|
||||
_thsCheckboxStyle = _thsCheckboxStyle t1 <> _thsCheckboxStyle t2,
|
||||
|
@ -150,8 +150,8 @@ listViewItemSelectedStyle themeMod = listViewItemStyle themeMod
|
||||
|
||||
baseBasic :: BaseThemeColors -> ThemeState
|
||||
baseBasic themeMod = def
|
||||
& L.emptyOverlay .~ bgColor (emptyOverlay themeMod)
|
||||
& L.emptyOverlay . L.padding ?~ padding 10
|
||||
& L.emptyOverlayStyle .~ bgColor (emptyOverlay themeMod)
|
||||
& L.emptyOverlayStyle . L.padding ?~ padding 10
|
||||
& L.btnStyle .~ btnStyle themeMod
|
||||
& L.btnMainStyle .~ btnMainStyle themeMod
|
||||
& L.checkboxWidth .~ 20
|
||||
|
@ -231,7 +231,7 @@ baseStyleFromTheme theme = style where
|
||||
fromThemeState tstate = Just $ def {
|
||||
_sstFgColor = Just $ _thsFgColor tstate,
|
||||
_sstHlColor = Just $ _thsHlColor tstate,
|
||||
_sstText = Just $ _thsText tstate
|
||||
_sstText = Just $ _thsTextStyle tstate
|
||||
}
|
||||
|
||||
mergeBasicStyle :: Style -> Style
|
||||
|
@ -11,10 +11,10 @@ import Monomer.Core
|
||||
import qualified Monomer.Lens as L
|
||||
|
||||
themeEmptyOverlay :: WidgetEnv s e -> Style
|
||||
themeEmptyOverlay wenv = collectTheme wenv L.emptyOverlay
|
||||
themeEmptyOverlay wenv = collectTheme wenv L.emptyOverlayStyle
|
||||
|
||||
themeText :: WidgetEnv s e -> Style
|
||||
themeText wenv = collectThemeField wenv L.text L.text
|
||||
themeText wenv = collectThemeField wenv L.text L.textStyle
|
||||
|
||||
themeBtn :: WidgetEnv s e -> Style
|
||||
themeBtn wenv = collectTheme wenv L.btnStyle
|
||||
|
Loading…
Reference in New Issue
Block a user