Improve Notebook styling
...Once we get PageWrapper, that is
This commit is contained in:
parent
48990469cf
commit
ddff2f9e47
@ -9,6 +9,9 @@ import "git.tebibyte.media/tomo/tomo"
|
|||||||
import "git.tebibyte.media/tomo/tomo/event"
|
import "git.tebibyte.media/tomo/tomo/event"
|
||||||
import "git.tebibyte.media/tomo/backend/style"
|
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 colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 }
|
||||||
var colorInput = color.RGBA { R: 208, G: 203, B: 150, 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 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.AttrMinimumSize { X: 32, Y: 32 },
|
||||||
tomo.AttrColor { Color: colorCalendarWeekend },
|
tomo.AttrColor { Color: colorCalendarWeekend },
|
||||||
), tomo.R("", "CalendarDay"), "weekend"),
|
), 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
|
// *.TabRow
|
||||||
style.Ru(style.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AGap(0, 0),
|
||||||
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.AttrPadding(tomo.I(1, 0, 0, 0)),
|
tomo.AttrPadding(tomo.I(1, 0, 0, 0)),
|
||||||
), tomo.R("", "TabRow")),
|
), 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]
|
// *.TabSpacer[right]
|
||||||
style.Ru(style.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 0, 0, 0),
|
Width: tomo.I(1, 0, 0, 0),
|
||||||
Color: [4]color.Color {
|
Color: [4]color.Color {
|
||||||
colorGutter, colorGutter,
|
colorTransparent, colorTransparent,
|
||||||
colorGutter, colorGutter,
|
colorTransparent, colorTransparent,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -505,10 +502,6 @@ rules := []style.Rule {
|
|||||||
Width: tomo.I(0, 0, 1, 1),
|
Width: tomo.I(0, 0, 1, 1),
|
||||||
Color: borderColorOutline,
|
Color: borderColorOutline,
|
||||||
},
|
},
|
||||||
tomo.Border {
|
|
||||||
Width: tomo.I(0, 0, 0, 1),
|
|
||||||
Color: borderColorShade,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
tomo.AttrMinimumSize { X: 3 },
|
tomo.AttrMinimumSize { X: 3 },
|
||||||
), tomo.R("", "TabSpacer"), "right"),
|
), tomo.R("", "TabSpacer"), "right"),
|
||||||
@ -519,8 +512,8 @@ rules := []style.Rule {
|
|||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 0, 0, 0),
|
Width: tomo.I(1, 0, 0, 0),
|
||||||
Color: [4]color.Color {
|
Color: [4]color.Color {
|
||||||
colorGutter, colorGutter,
|
colorTransparent, colorTransparent,
|
||||||
colorGutter, colorGutter,
|
colorTransparent, colorTransparent,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
|
Loading…
Reference in New Issue
Block a user