From 69576c7aca1c38cdbbde8e45904a8db07b4e200c Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 6 May 2024 23:25:53 -0400 Subject: [PATCH] Add basic icons to wintergreen theme --- internal/theme/default/assets/icons-large.png | Bin 0 -> 3598 bytes internal/theme/default/assets/icons-large.xcf | Bin 0 -> 50759 bytes internal/theme/default/assets/icons-small.png | Bin 0 -> 2369 bytes internal/theme/default/assets/icons-small.xcf | Bin 0 -> 31960 bytes internal/theme/default/default.go | 212 +--------------- internal/theme/default/icon.go | 228 ++++++++++++++++++ internal/theme/default/style.go | 216 +++++++++++++++++ 7 files changed, 445 insertions(+), 211 deletions(-) create mode 100644 internal/theme/default/assets/icons-large.png create mode 100644 internal/theme/default/assets/icons-large.xcf create mode 100644 internal/theme/default/assets/icons-small.png create mode 100644 internal/theme/default/assets/icons-small.xcf create mode 100644 internal/theme/default/icon.go create mode 100644 internal/theme/default/style.go diff --git a/internal/theme/default/assets/icons-large.png b/internal/theme/default/assets/icons-large.png new file mode 100644 index 0000000000000000000000000000000000000000..02c8772e31a1fa77ef0879b43e4c3dc52af38248 GIT binary patch literal 3598 zcmV+p4)O7cP)}nHO<#Zfw%idu_e_>0j zbDWU-V`==O)*vaYNkI{XO>OC{JXBRt7Kmwo))6m~3UQi3Q zy@Q>egoKMw9)GIYy`AE(KVB!NWOcbAE5d}t#O)jRO7GzMklKb z*W*turH|8rHJzNUul{_ApoF*tiAM`%$lwo6(XaM^prz}ITXQ#Dx_Ln}!Av}gPKt^D zitd`wvnhzbXR*_@%TFzhjr>cc?-OpJthuhOnnLgPNo514se9_hu@tB=NIHo^p*;4? z?PEP5UDYA}l60DU;g>68BX6sMpo-NWf>@#D^o@(fv5_SeOLUYPm#RN$ih8#bcF6c5 zNT;71SfRti5*;LH=j~$)X;b98orKwPI`ByGhD&$P3KtJAV>6U9MXuW^Rsat=J9+$# zl^ZU-u^@zm=~zcL&RtWwYfgXWcJ(S# zJUOWERky`UN7zZ+HhXh*X@wx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-8tu+IMTXHIO@FLqltgO+croHvwUlyIAGC2R9_d`)+9mC-1>s4++t}TMZ%J zgB!LR(at3n?ZI6Q*VVS3?dBfA1}8HTN+N_e~|1&84tSCCiVVmOsAu57Tak UQ>L78zW@LL07*qoM6N<$f>8I}t^fc4 literal 0 HcmV?d00001 diff --git a/internal/theme/default/assets/icons-large.xcf b/internal/theme/default/assets/icons-large.xcf new file mode 100644 index 0000000000000000000000000000000000000000..1495c6cb0aeda2982cfa375a65f7dd5d6c3328ff GIT binary patch literal 50759 zcmeI5dyHSlRmbn|{oeQbwMljp$H8fA$8ORpO_N$}fdWcW5J(7A1g>K{CJ#rBQ|y4c z5ZVSsDQ>A~sZ>E!1VRv1LIOoXr2>IM|EK`*H}DT2)T*Sk=_75@{P=$6%-lQo{(if5 zD`&6i-d)em>&%%mXU?2Cb7p=&pE~{Uqig4npIm$2;Uhh62U#~${+4@_yJqUH}qj^{1D``;{n$M0JF zqyJ*@j~(#w`+fY|KK^|lf5yk3^YK6W_}_i}qK{v*_$NFc?qQMX=iYmK{2m{Be%f3Us#x+HCg}n;xc})3S zk%nTvFoZ&u-ly~7JMbY%2U8mt3Zw%3Zy48PNp1XX14_p}Su)vbvShN=WXWW!$&zBL zYn*V`#xG|>8IKpV)-_fQPJ>@jSQvlHviiH8JXz4DPioD~CLM_k+Kn}g-cVwo0zZ5S zMa^q76OM&cPd3Ki2%Rf7Z5m)|PEYkz`ceclPFj9e0+y~IzL`PP1z_urp_rVNAJ4|KgX50D`j zL$<_bE6?+&nS3)KV>9?Fh}{DOvm(}1gf!Bc+n>^IrXWpc2_V

s+~zbRlg_<+=)>KWyeSglb@I3t-VpbY$Li%l_9;JVij@Ceo4PIm&q z2be&;jjEk|J*8jcXry47&Nl-gH%SezV;551v+*>GxY|xXB7wG_uwxeRbUa9)s*`*z zrU!~l!(~{y#ctTN+2g&A>uIoI={ClFX@QYe_=jL z)pF$uhMmbkgb&6`Nl*Rs#ydpkPK8|(g53&GOn=vCaMvo#$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)=g~I7=JSLj|6vlAcjubfo7* zF)?mD^cj621#BJkwd~S3#7G0f)ii1Jsa;9)0c!A(r$6%a75XGkIeFm7Lo+&=H2An9 zAWc6*^+}rkkr>j@#o?Vayjic^kk^lwqp>#AMwiq6dxa_X_j>1>NwOXVeP7f+`@mO6 zJ>UcB+kH?}d)9w1n9|AM9mkG8c<`jcqlK?~V_f=q_s1;eZ_0v(mA(5P zEPjEnSkuo7xBB?47V|f4qx4VxqLu&5&sqGlKW*{P-)r$NyvyQWdb`EPJ)Ywp?xcr1 z?cpBsaA!Q+**96c$2}d7d${u+?pHnB`#s!mc(@PTZ0(-%<9N!$J?-H>?BPD*;XdZ! zK7OsW`{Yg^d$><|xIgf4pZ0KnwTJuMCoKOrKL58q|93wB_dfrE&nL<1#nlVtg`*|*?Z$m^^}I%3QaD;tzv*~O z8#xqQ1*0!f`YOp!rLc@uP)UAidcTtVO7ctNKxtBswNXiaY4gq=Q|bKDq`#8HMQ**!FRs+gj(#wRutDf{)LKxIBMPwIZq&QQAIWHeluRiS^?arYp&>Bp>}> zO4!zRKy~shN$M(}&lc`4Q?=`MU-xC{+e-2)$uE-wHB@9^GlQdO6QlR@vyKe$*&~86d9;=ewpiDKA(>&JgM-6!h<0$ z&)-v7LDh;Vb465=U!E;cNq!~y=>JkeDb`Pz?@ICmCrXLSkvK2u)ycP%IS=;=+k4$t zl3&{VS31Acbzez-CHbXrpzL)oAJ253PxbPxwAXKCzx}G-`B(4!%aMUf@~3|KV5{Dt zRyx1Z`K55+Dp>a=zO}F3`IoHqwo1QF>8FzXQa;BUR(mPhE=c=TF!xg=GEnz=$5+AV zgA|kyS33Xomak3mZ|ik0pHKCDK9gsiZ7mb!ocF^Tt@eV-3JS8YS*CA9hjy=jkQ?+ur{Jk(|qh literal 0 HcmV?d00001 diff --git a/internal/theme/default/assets/icons-small.png b/internal/theme/default/assets/icons-small.png new file mode 100644 index 0000000000000000000000000000000000000000..c3b2fdb0f631da0869496eee6b18bfb0a4010adc GI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go index 624958e..4482c08 100644 --- a/internal/theme/default/default.go +++ b/internal/theme/default/default.go @@ -1,220 +1,9 @@ package defaultTheme import "image/color" -import "git.tebibyte.media/tomo/tomo" -import "golang.org/x/image/font/basicfont" import "git.tebibyte.media/tomo/tomo/theme" import dataTheme "git.tebibyte.media/tomo/nasin/internal/theme" -var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 } -var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 } -var colorCarved = color.RGBA { R: 151, G: 160, B: 150, A: 255 } -var colorShadow = color.RGBA { R: 57, G: 59, B: 57, A: 255 } -var colorInputShadow = color.RGBA { R: 143, G: 146, B: 91, A: 255 } -var colorHighlight = color.RGBA { R: 207, G: 215, B: 210, A: 255 } -var colorBackground = color.RGBA { R: 169, G: 171, B: 168, A: 255 } -var colorCarvedPressed = color.RGBA { R: 129, G: 142, B: 137, A: 255 } -var colorForeground = color.Black -var colorOutline = color.Black - -var outline = tomo.Border { - Width: tomo.I(1), - Color: [4]color.Color { - colorOutline, - colorOutline, - colorOutline, - colorOutline, - }, -} - -var borderColorEngraved = [4]color.Color { colorShadow, colorHighlight, colorHighlight, colorShadow } -var borderColorLifted = [4]color.Color { colorHighlight, colorShadow, colorShadow, colorHighlight } -var borderColorInput = [4]color.Color { colorInputShadow, colorInput, colorInput, colorInputShadow } -var borderColorFocused = [4]color.Color { colorFocus, colorFocus, colorFocus, colorFocus } - -var rules = []dataTheme.Rule { - // *.*[*] - dataTheme.Rule { - Default: dataTheme.AS ( - dataTheme.AttrFace { Face: basicfont.Face7x13 }, - dataTheme.AttrTextColor { Color: theme.ColorForeground }, - dataTheme.AttrDotColor { Color: theme.ColorAccent }, - dataTheme.AttrGap { X: 8, Y: 8 }, - ), - }, - - // *.Button[*] - dataTheme.Rule { - Role: theme.R("", "Button", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorLifted, - }, - }, - dataTheme.AttrPadding(tomo.I(4, 8)), - dataTheme.AttrColor { Color: theme.ColorRaised }, - ), - Pressed: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1, 0, 0, 1), - Color: borderColorEngraved, - }, - }, - dataTheme.AttrPadding(tomo.I(5, 8, 4, 9)), - dataTheme.AttrColor { Color: colorCarvedPressed }, - ), - Focused: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorFocused, - }, - }, - dataTheme.AttrPadding(tomo.I(4, 8)), - ), - }, - - // *.TextInput[*] - dataTheme.Rule { - Role: theme.R("", "TextInput", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorInput, - }, - }, - dataTheme.AttrColor { Color: colorInput }, - dataTheme.AttrPadding(tomo.I(5, 4, 4, 5)), - ), - Focused: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorFocused, - }, - }, - ), - }, - - // *.NumberInput[*] - dataTheme.Rule { - Role: theme.R("", "NumberInput", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorInput, - }, - }, - dataTheme.AttrColor { Color: colorInput }, - dataTheme.AttrPadding(tomo.I(5, 4, 4, 5)), - ), - Focused: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorFocused, - }, - }, - ), - }, - - // *.Container[outer] - dataTheme.Rule { - Role: theme.R("", "Container", "outer"), - Default: dataTheme.AS ( - dataTheme.AttrColor { Color: theme.ColorBackground }, - dataTheme.AttrPadding(tomo.I(8)), - ), - }, - - // *.Heading[*] - dataTheme.Rule { - Role: theme.R("", "Heading", ""), - Default: dataTheme.AS ( - dataTheme.AttrAlign { X: tomo.AlignMiddle, Y: tomo.AlignMiddle }, - ), - }, - - // *.Separator[*] - dataTheme.Rule { - Role: theme.R("", "Separator", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - tomo.Border { - Width: tomo.I(1), - Color: borderColorEngraved, - }, - }, - ), - }, - - // *.Slider[*] - dataTheme.Rule { - Role: theme.R("", "Slider", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1, 0, 0, 1), - Color: borderColorEngraved, - }, - }, - dataTheme.AttrColor { Color: theme.ColorSunken }, - dataTheme.AttrPadding(tomo.I(0, 1, 1, 0)), - ), - Focused: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorFocused, - }, - }, - dataTheme.AttrPadding(tomo.I(0)), - ), - }, - - // *.Slider[horizontal] - dataTheme.Rule { - Role: theme.R("", "Slider", "horizontal"), - Default: dataTheme.AS(dataTheme.AttrMinimumSize { X: 48 }), - }, - - // *.Slider[vertical] - dataTheme.Rule { - Role: theme.R("", "Slider", "vertical"), - Default: dataTheme.AS(dataTheme.AttrMinimumSize { Y: 48 }), - }, - - // *.SliderHandle[*] - dataTheme.Rule { - Role: theme.R("", "SliderHandle", ""), - Default: dataTheme.AS ( - dataTheme.AttrBorder { - outline, - tomo.Border { - Width: tomo.I(1), - Color: borderColorLifted, - }, - }, - dataTheme.AttrColor { Color: theme.ColorRaised }, - dataTheme.AttrMinimumSize { X: 12, Y: 12, }, - ), - }, -} - // Theme returns Wintergreen, the default Tomo theme. It is neutral-gray with // green and turquoise accents. func Theme () theme.Theme { @@ -227,5 +16,6 @@ func Theme () theme.Theme { theme.ColorAccent: colorFocus, }, Rules: rules, + IconTheme: &iconTheme { }, } } diff --git a/internal/theme/default/icon.go b/internal/theme/default/icon.go new file mode 100644 index 0000000..5f68417 --- /dev/null +++ b/internal/theme/default/icon.go @@ -0,0 +1,228 @@ +package defaultTheme + +import "bytes" +import "image" +import _ "embed" +import _ "image/png" +import "git.tebibyte.media/tomo/tomo" +import "git.tebibyte.media/tomo/tomo/data" +import "git.tebibyte.media/tomo/tomo/theme" +import "git.tebibyte.media/tomo/tomo/canvas" + +//go:embed assets/icons-small.png +var atlasSmallBytes []byte +//go:embed assets/icons-large.png +var atlasLargeBytes []byte + +func generateSource (data []byte, width int) map[theme.Icon] canvas.Texture { + atlasImage, _, err := image.Decode(bytes.NewReader(data)) + if err != nil { panic(err) } + atlasTexture := tomo.NewTexture(atlasImage) + + source := make(map[theme.Icon] canvas.Texture) + x := 0 + y := 0 + + row := func () { + x = 0 + y ++ + } + col := func (id theme.Icon) { + source[id] = atlasTexture.Clip(image.Rect ( + x * width, + y * width, + (x + 1) * width, + (y + 1) * width)) + x++ + } + + // objects + col(theme.IconUnknown) + col(theme.IconFile) + col(theme.IconDirectory) + col(theme.IconStorage) + col(theme.IconApplication) + col(theme.IconNetwork) + col(theme.IconDevice) + col(theme.IconPeripheral) + col(theme.IconPort) + + // actions: files + row() + col(theme.IconActionOpen) + col(theme.IconActionOpenIn) + col(theme.IconActionSave) + col(theme.IconActionSaveAs) + col(theme.IconActionPrint) + col(theme.IconActionNew) + col(theme.IconActionNewDirectory) + col(theme.IconActionDelete) + col(theme.IconActionRename) + col(theme.IconActionGetInformation) + col(theme.IconActionChangePermissions) + col(theme.IconActionRevert) + + // actions: list management + row() + col(theme.IconActionAdd) + col(theme.IconActionRemove) + col(theme.IconActionAddBookmark) + col(theme.IconActionRemoveBookmark) + col(theme.IconActionAddFavorite) + col(theme.IconActionRemoveFavorite) + + // actions: media + row() + col(theme.IconActionPlay) + col(theme.IconActionPause) + col(theme.IconActionStop) + col(theme.IconActionFastForward) + col(theme.IconActionRewind) + col(theme.IconActionToBeginning) + col(theme.IconActionToEnd) + col(theme.IconActionRecord) + col(theme.IconActionVolumeUp) + col(theme.IconActionVolumeDown) + col(theme.IconActionMute) + + // actions: editing + row() + col(theme.IconActionUndo) + col(theme.IconActionRedo) + col(theme.IconActionCut) + col(theme.IconActionCopy) + col(theme.IconActionPaste) + col(theme.IconActionFind) + col(theme.IconActionReplace) + col(theme.IconActionSelectAll) + col(theme.IconActionSelectNone) + col(theme.IconActionIncrement) + col(theme.IconActionDecrement) + + // actions: window management + row() + col(theme.IconActionClose) + col(theme.IconActionQuit) + col(theme.IconActionIconify) + col(theme.IconActionShade) + col(theme.IconActionMaximize) + col(theme.IconActionFullScreen) + col(theme.IconActionRestore) + + // actions: view + row() + col(theme.IconActionExpand) + col(theme.IconActionContract) + col(theme.IconActionBack) + col(theme.IconActionForward) + col(theme.IconActionUp) + col(theme.IconActionDown) + col(theme.IconActionReload) + col(theme.IconActionZoomIn) + col(theme.IconActionZoomOut) + col(theme.IconActionZoomReset) + col(theme.IconActionMove) + col(theme.IconActionResize) + col(theme.IconActionGoTo) + + // actions: tools + row() + col(theme.IconActionTransform) + col(theme.IconActionTranslate) + col(theme.IconActionRotate) + col(theme.IconActionScale) + col(theme.IconActionWarp) + col(theme.IconActionCornerPin) + col(theme.IconActionSelectRectangle) + col(theme.IconActionSelectEllipse) + col(theme.IconActionSelectLasso) + col(theme.IconActionSelectGeometric) + col(theme.IconActionSelectAuto) + col(theme.IconActionCrop) + col(theme.IconActionFill) + row() + col(theme.IconActionGradient) + col(theme.IconActionPencil) + col(theme.IconActionBrush) + col(theme.IconActionEraser) + col(theme.IconActionText) + col(theme.IconActionEyedropper) + + // status: dialog + row() + col(theme.IconStatusInformation) + col(theme.IconStatusQuestion) + col(theme.IconStatusWarning) + col(theme.IconStatusError) + col(theme.IconStatusCancel) + col(theme.IconStatusOkay) + + // status: network + row() + col(theme.IconStatusCellSignal0) + col(theme.IconStatusCellSignal1) + col(theme.IconStatusCellSignal2) + col(theme.IconStatusCellSignal3) + col(theme.IconStatusWirelessSignal0) + col(theme.IconStatusWirelessSignal1) + col(theme.IconStatusWirelessSignal2) + col(theme.IconStatusWirelessSignal3) + + // status: power + row() + col(theme.IconStatusBattery0) + col(theme.IconStatusBattery1) + col(theme.IconStatusBattery2) + col(theme.IconStatusBattery3) + col(theme.IconStatusBrightness0) + col(theme.IconStatusBrightness1) + col(theme.IconStatusBrightness2) + col(theme.IconStatusBrightness3) + + // status: media + row() + col(theme.IconStatusVolume0) + col(theme.IconStatusVolume1) + col(theme.IconStatusVolume2) + col(theme.IconStatusVolume3) + + return source +} + +type iconTheme struct { + texturesSmall map[theme.Icon] canvas.Texture + texturesLarge map[theme.Icon] canvas.Texture +} + +func (this *iconTheme) ensure () { + if this.texturesSmall != nil { return } + this.texturesSmall = generateSource(atlasSmallBytes, 16) + this.texturesLarge = generateSource(atlasLargeBytes, 32) +} + +func (this *iconTheme) selectSource (size theme.IconSize) map[theme.Icon] canvas.Texture { + if size == theme.IconSizeSmall { + return this.texturesSmall + } else { + return this.texturesLarge + } +} + +func (this *iconTheme) Icon (icon theme.Icon, size theme.IconSize) canvas.Texture { + this.ensure() + source := this.selectSource(size) + if texture, ok := source[icon]; ok { + return texture + } + return source[theme.IconUnknown] +} + +func (this *iconTheme) MimeIcon (mime data.Mime, size theme.IconSize) canvas.Texture { + this.ensure() + source := this.selectSource(size) + if mime == data.M("inode", "directory") { + return source[theme.IconDirectory] + } else { + return source[theme.IconFile] + } +} diff --git a/internal/theme/default/style.go b/internal/theme/default/style.go new file mode 100644 index 0000000..12336c4 --- /dev/null +++ b/internal/theme/default/style.go @@ -0,0 +1,216 @@ +package defaultTheme + +import "image/color" +import "git.tebibyte.media/tomo/tomo" +import "golang.org/x/image/font/basicfont" +import "git.tebibyte.media/tomo/tomo/theme" +import dataTheme "git.tebibyte.media/tomo/nasin/internal/theme" + +var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 } +var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 } +var colorCarved = color.RGBA { R: 151, G: 160, B: 150, A: 255 } +var colorShadow = color.RGBA { R: 57, G: 59, B: 57, A: 255 } +var colorInputShadow = color.RGBA { R: 143, G: 146, B: 91, A: 255 } +var colorHighlight = color.RGBA { R: 207, G: 215, B: 210, A: 255 } +var colorBackground = color.RGBA { R: 169, G: 171, B: 168, A: 255 } +var colorCarvedPressed = color.RGBA { R: 129, G: 142, B: 137, A: 255 } +var colorForeground = color.Black +var colorOutline = color.Black + +var outline = tomo.Border { + Width: tomo.I(1), + Color: [4]color.Color { + colorOutline, + colorOutline, + colorOutline, + colorOutline, + }, +} + +var borderColorEngraved = [4]color.Color { colorShadow, colorHighlight, colorHighlight, colorShadow } +var borderColorLifted = [4]color.Color { colorHighlight, colorShadow, colorShadow, colorHighlight } +var borderColorInput = [4]color.Color { colorInputShadow, colorInput, colorInput, colorInputShadow } +var borderColorFocused = [4]color.Color { colorFocus, colorFocus, colorFocus, colorFocus } + +var rules = []dataTheme.Rule { + // *.*[*] + dataTheme.Rule { + Default: dataTheme.AS ( + dataTheme.AttrFace { Face: basicfont.Face7x13 }, + dataTheme.AttrTextColor { Color: theme.ColorForeground }, + dataTheme.AttrDotColor { Color: theme.ColorAccent }, + dataTheme.AttrGap { X: 8, Y: 8 }, + ), + }, + + // *.Button[*] + dataTheme.Rule { + Role: theme.R("", "Button", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorLifted, + }, + }, + dataTheme.AttrPadding(tomo.I(4, 8)), + dataTheme.AttrColor { Color: theme.ColorRaised }, + ), + Pressed: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1, 0, 0, 1), + Color: borderColorEngraved, + }, + }, + dataTheme.AttrPadding(tomo.I(5, 8, 4, 9)), + dataTheme.AttrColor { Color: colorCarvedPressed }, + ), + Focused: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorFocused, + }, + }, + dataTheme.AttrPadding(tomo.I(4, 8)), + ), + }, + + // *.TextInput[*] + dataTheme.Rule { + Role: theme.R("", "TextInput", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorInput, + }, + }, + dataTheme.AttrColor { Color: colorInput }, + dataTheme.AttrPadding(tomo.I(5, 4, 4, 5)), + ), + Focused: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorFocused, + }, + }, + ), + }, + + // *.NumberInput[*] + dataTheme.Rule { + Role: theme.R("", "NumberInput", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorInput, + }, + }, + dataTheme.AttrColor { Color: colorInput }, + dataTheme.AttrPadding(tomo.I(5, 4, 4, 5)), + ), + Focused: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorFocused, + }, + }, + ), + }, + + // *.Container[outer] + dataTheme.Rule { + Role: theme.R("", "Container", "outer"), + Default: dataTheme.AS ( + dataTheme.AttrColor { Color: theme.ColorBackground }, + dataTheme.AttrPadding(tomo.I(8)), + ), + }, + + // *.Heading[*] + dataTheme.Rule { + Role: theme.R("", "Heading", ""), + Default: dataTheme.AS ( + dataTheme.AttrAlign { X: tomo.AlignMiddle, Y: tomo.AlignMiddle }, + ), + }, + + // *.Separator[*] + dataTheme.Rule { + Role: theme.R("", "Separator", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + tomo.Border { + Width: tomo.I(1), + Color: borderColorEngraved, + }, + }, + ), + }, + + // *.Slider[*] + dataTheme.Rule { + Role: theme.R("", "Slider", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1, 0, 0, 1), + Color: borderColorEngraved, + }, + }, + dataTheme.AttrColor { Color: theme.ColorSunken }, + dataTheme.AttrPadding(tomo.I(0, 1, 1, 0)), + ), + Focused: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorFocused, + }, + }, + dataTheme.AttrPadding(tomo.I(0)), + ), + }, + + // *.Slider[horizontal] + dataTheme.Rule { + Role: theme.R("", "Slider", "horizontal"), + Default: dataTheme.AS(dataTheme.AttrMinimumSize { X: 48 }), + }, + + // *.Slider[vertical] + dataTheme.Rule { + Role: theme.R("", "Slider", "vertical"), + Default: dataTheme.AS(dataTheme.AttrMinimumSize { Y: 48 }), + }, + + // *.SliderHandle[*] + dataTheme.Rule { + Role: theme.R("", "SliderHandle", ""), + Default: dataTheme.AS ( + dataTheme.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorLifted, + }, + }, + dataTheme.AttrColor { Color: theme.ColorRaised }, + dataTheme.AttrMinimumSize { X: 12, Y: 12, }, + ), + }, +}