Improve Notebook styling

...Once we get PageWrapper, that is
This commit is contained in:
Sasha Koshka 2024-09-12 15:50:09 -04:00
parent 48990469cf
commit ddff2f9e47

View File

@ -9,6 +9,9 @@ import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/tomo/event"
import "git.tebibyte.media/tomo/backend/style"
// Note: these are color.RGBA values. Remember alpha premultiplication.
var colorTransparent = color.RGBA { A: 0 }
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 }
@ -454,47 +457,41 @@ rules := []style.Rule {
tomo.AttrMinimumSize { X: 32, Y: 32 },
tomo.AttrColor { Color: colorCalendarWeekend },
), tomo.R("", "CalendarDay"), "weekend"),
// *.Notebook
style.Ru(style.AS (
tomo.AGap(0, 0),
), tomo.R("", "Notebook")),
// *.PageWrapper
style.Ru(style.AS (
tomo.ABorder (
tomo.Border {
Width: tomo.I(0, 1, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(0, 1, 1, 1),
Color: borderColorLifted,
}),
tomo.AColor(tomo.ColorBackground),
tomo.APadding(8),
), tomo.R("", "PageWrapper")),
// *.TabRow
style.Ru(style.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
tomo.AttrGap { X: 0, Y: 0 },
tomo.AttrColor { Color: colorGutter },
tomo.AGap(0, 0),
tomo.AttrPadding(tomo.I(1, 0, 0, 0)),
), tomo.R("", "TabRow")),
// *.TabSpacer[left]
style.Ru(style.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorOutline,
},
},
tomo.AttrMinimumSize { X: 1 },
), tomo.R("", "TabSpacer")),
// *.TabSpacer[right]
style.Ru(style.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
colorTransparent, colorTransparent,
colorTransparent, colorTransparent,
},
},
tomo.Border {
@ -505,10 +502,6 @@ rules := []style.Rule {
Width: tomo.I(0, 0, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(0, 0, 0, 1),
Color: borderColorShade,
},
},
tomo.AttrMinimumSize { X: 3 },
), tomo.R("", "TabSpacer"), "right"),
@ -519,8 +512,8 @@ rules := []style.Rule {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
colorTransparent, colorTransparent,
colorTransparent, colorTransparent,
},
},
tomo.Border {