diff --git a/Makefile b/Makefile index 2072767..0a9001d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Binary name BINARY_NAME=lazyprisma -VERSION ?= 0.3.1 +VERSION ?= 0.3.2 # Directories BUILD_DIR=build diff --git a/main.go b/main.go index ad7bf6e..9ba888e 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( ) const ( - Version = "v0.3.1" + Version = "v0.3.2" Developer = "DokaLab" ) diff --git a/pkg/gui/context/output_context.go b/pkg/gui/context/output_context.go index 35e2f6f..779923f 100644 --- a/pkg/gui/context/output_context.go +++ b/pkg/gui/context/output_context.go @@ -70,6 +70,15 @@ func (o *OutputContext) Draw(dim boxlayout.Dimensions) error { o.ScrollableTrait.SetView(v) // ScrollableTrait o.setupView(v) + // Frame colours based on focus (set after Clear to persist through render) + if o.IsFocused() { + v.FrameColor = style.FocusedFrameColor + v.TitleColor = style.FocusedTitleColor + } else { + v.FrameColor = style.PrimaryFrameColor + v.TitleColor = style.PrimaryTitleColor + } + v.Subtitle = o.subtitle v.Wrap = true fmt.Fprint(v, o.content) @@ -99,7 +108,6 @@ func (o *OutputContext) setupView(v *gocui.View) { v.Frame = true v.Title = o.tr.PanelTitleOutput v.FrameRunes = style.DefaultFrameRunes - o.ApplyFocusStyle() } // AppendOutput appends text to the output buffer and flags auto-scroll diff --git a/pkg/gui/context/workspace_context.go b/pkg/gui/context/workspace_context.go index efcca1f..7b930ad 100644 --- a/pkg/gui/context/workspace_context.go +++ b/pkg/gui/context/workspace_context.go @@ -91,6 +91,15 @@ func (w *WorkspaceContext) Draw(dim boxlayout.Dimensions) error { w.ScrollableTrait.SetView(v) // ScrollableTrait w.setupView(v) + // Frame colours based on focus (set after Clear to persist through render) + if w.IsFocused() { + v.FrameColor = style.FocusedFrameColor + v.TitleColor = style.FocusedTitleColor + } else { + v.FrameColor = style.PrimaryFrameColor + v.TitleColor = style.PrimaryTitleColor + } + v.Wrap = true // Enable word wrap // Build content from fields @@ -144,7 +153,6 @@ func (w *WorkspaceContext) setupView(v *gocui.View) { v.Frame = true v.Title = w.tr.PanelTitleWorkspace v.FrameRunes = style.DefaultFrameRunes - w.ApplyFocusStyle() } // Refresh reloads all workspace information