mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Attempt to offer linux transparency
Add 'transparent' as a color option Default to 'transparent' Make sure to set color to appropriate things, so transparency is achieved
This commit is contained in:
@@ -20,8 +20,8 @@ func NewDisplay(widgets []wtf.Wtfable, config *config.Config) *Display {
|
||||
config: config,
|
||||
}
|
||||
|
||||
display.Grid.SetBackgroundColor(wtf.ColorFor(config.UString("wtf.colors.background", "transparent")))
|
||||
display.build(widgets)
|
||||
display.Grid.SetBackgroundColor(wtf.ColorFor(config.UString("wtf.colors.background", "black")))
|
||||
|
||||
return &display
|
||||
}
|
||||
|
||||
@@ -37,6 +37,13 @@ func NewWtfApp(app *tview.Application, config *config.Config, configFilePath str
|
||||
pages: tview.NewPages(),
|
||||
}
|
||||
|
||||
wtfApp.app.SetBeforeDrawFunc(func(s tcell.Screen) bool {
|
||||
s.Clear()
|
||||
return false
|
||||
})
|
||||
|
||||
wtfApp.pages.Box.SetBackgroundColor(wtf.ColorFor(config.UString("wtf.colors.background", "transparent")))
|
||||
|
||||
wtfApp.app.SetInputCapture(wtfApp.keyboardIntercept)
|
||||
wtfApp.widgets = MakeWidgets(wtfApp.app, wtfApp.pages, wtfApp.config)
|
||||
wtfApp.display = NewDisplay(wtfApp.widgets, wtfApp.config)
|
||||
|
||||
Reference in New Issue
Block a user