|
@@ -145,6 +145,20 @@ func (f *Folder) update() {
|
|
|
f.applyStyle(f.styles.Normal)
|
|
f.applyStyle(f.styles.Normal)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (f *Folder) SetBgColor(c *math32.Color) {
|
|
|
|
|
+
|
|
|
|
|
+ f.styles.Normal.BgColor = *c
|
|
|
|
|
+ f.styles.Over.BgColor = *c
|
|
|
|
|
+ f.update()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func (f *Folder) SetFgColor(c *math32.Color) {
|
|
|
|
|
+
|
|
|
|
|
+ f.styles.Normal.FgColor = *c
|
|
|
|
|
+ f.styles.Over.FgColor = *c
|
|
|
|
|
+ f.update()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// applyStyle applies the specified style
|
|
// applyStyle applies the specified style
|
|
|
func (f *Folder) applyStyle(s *FolderStyle) {
|
|
func (f *Folder) applyStyle(s *FolderStyle) {
|
|
|
|
|
|
|
@@ -159,7 +173,9 @@ func (f *Folder) applyStyle(s *FolderStyle) {
|
|
|
icode = 1
|
|
icode = 1
|
|
|
}
|
|
}
|
|
|
f.icon.SetText(string(s.Icons[icode]))
|
|
f.icon.SetText(string(s.Icons[icode]))
|
|
|
|
|
+ f.icon.SetColor(&s.FgColor)
|
|
|
f.label.SetBgColor(&s.BgColor)
|
|
f.label.SetBgColor(&s.BgColor)
|
|
|
|
|
+ f.label.SetColor(&s.FgColor)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (f *Folder) recalc() {
|
|
func (f *Folder) recalc() {
|