detached a9e245c

fix(ui): hide tab bar during fullscreen video playback

commit
a9e245c6b4bf58a36374f161c9bef5503c97fe2e
author
bnema · · 2025-12-27 22:45 UTC
parent
d3cff9d
signature
GPG Unverified2B82207D370127A0 The key is unknown
2 files · +28 -0
M internal/ui/app.go +14 -0
@@ -1006,6 +1006,20 @@ func (a *App) initCoordinators(ctx context.Context) {
10061006 a.contentCoord.SetIdleInhibitor(a.deps.IdleInhibitor)
10071007 }
10081008
1009+ // Set fullscreen callback to hide/show tab bar
1010+ a.contentCoord.SetOnFullscreenChanged(func(entering bool) {
1011+ if a.mainWindow == nil || a.mainWindow.TabBar() == nil {
1012+ return
1013+ }
1014+ if entering {
1015+ // Hide tab bar when entering fullscreen video
1016+ a.mainWindow.TabBar().SetVisible(false)
1017+ } else {
1018+ // Restore tab bar visibility based on normal logic
1019+ a.tabCoord.UpdateBarVisibility(ctx)
1020+ }
1021+ })
1022+
10091023 // 2. Tab Coordinator
10101024 a.tabCoord = coordinator.NewTabCoordinator(ctx, coordinator.TabCoordinatorConfig{
10111025 TabsUC: a.tabsUC,
@@ -1006,6 +1006,20 @@ func (a *App) initCoordinators(ctx context.Context) {
1006 a.contentCoord.SetIdleInhibitor(a.deps.IdleInhibitor)1006 a.contentCoord.SetIdleInhibitor(a.deps.IdleInhibitor)
1007 }1007 }
1008 1008
1009+ // Set fullscreen callback to hide/show tab bar
1010+ a.contentCoord.SetOnFullscreenChanged(func(entering bool) {
1011+ if a.mainWindow == nil || a.mainWindow.TabBar() == nil {
1012+ return
1013+ }
1014+ if entering {
1015+ // Hide tab bar when entering fullscreen video
1016+ a.mainWindow.TabBar().SetVisible(false)
1017+ } else {
1018+ // Restore tab bar visibility based on normal logic
1019+ a.tabCoord.UpdateBarVisibility(ctx)
1020+ }
1021+ })
1022+
1009 // 2. Tab Coordinator1023 // 2. Tab Coordinator
1010 a.tabCoord = coordinator.NewTabCoordinator(ctx, coordinator.TabCoordinatorConfig{1024 a.tabCoord = coordinator.NewTabCoordinator(ctx, coordinator.TabCoordinatorConfig{
1011 TabsUC: a.tabsUC,1025 TabsUC: a.tabsUC,
M internal/ui/coordinator/content.go +14 -0
@@ -75,6 +75,9 @@ type ContentCoordinator struct {
7575
7676 // Idle inhibitor for fullscreen video playback
7777 idleInhibitor port.IdleInhibitor
78+
79+ // Callback when fullscreen state changes (for hiding/showing tab bar)
80+ onFullscreenChanged func(entering bool)
7881 }
7982
8083 // NewContentCoordinator creates a new ContentCoordinator.
@@ -137,6 +140,11 @@ func (c *ContentCoordinator) SetIdleInhibitor(inhibitor port.IdleInhibitor) {
137140 c.idleInhibitor = inhibitor
138141 }
139142
143+// SetOnFullscreenChanged sets the callback for fullscreen state changes.
144+func (c *ContentCoordinator) SetOnFullscreenChanged(fn func(entering bool)) {
145+ c.onFullscreenChanged = fn
146+}
147+
140148 // EnsureWebView acquires or reuses a WebView for the given pane.
141149 func (c *ContentCoordinator) EnsureWebView(ctx context.Context, paneID entity.PaneID) (*webkit.WebView, error) {
142150 log := logging.FromContext(ctx)
@@ -1289,6 +1297,9 @@ func (c *ContentCoordinator) setupIdleInhibitionHandlers(ctx context.Context, pa
12891297 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to inhibit idle")
12901298 }
12911299 }
1300+ if c.onFullscreenChanged != nil {
1301+ c.onFullscreenChanged(true)
1302+ }
12921303 return false // Allow fullscreen
12931304 }
12941305
@@ -1298,6 +1309,9 @@ func (c *ContentCoordinator) setupIdleInhibitionHandlers(ctx context.Context, pa
12981309 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to uninhibit idle")
12991310 }
13001311 }
1312+ if c.onFullscreenChanged != nil {
1313+ c.onFullscreenChanged(false)
1314+ }
13011315 return false // Allow leaving fullscreen
13021316 }
13031317
@@ -75,6 +75,9 @@ type ContentCoordinator struct {
75 75
76 // Idle inhibitor for fullscreen video playback76 // Idle inhibitor for fullscreen video playback
77 idleInhibitor port.IdleInhibitor77 idleInhibitor port.IdleInhibitor
78+
79+ // Callback when fullscreen state changes (for hiding/showing tab bar)
80+ onFullscreenChanged func(entering bool)
78 }81 }
79 82
80 // NewContentCoordinator creates a new ContentCoordinator.83 // NewContentCoordinator creates a new ContentCoordinator.
@@ -137,6 +140,11 @@ func (c *ContentCoordinator) SetIdleInhibitor(inhibitor port.IdleInhibitor) {
137 c.idleInhibitor = inhibitor140 c.idleInhibitor = inhibitor
138 }141 }
139 142
143+// SetOnFullscreenChanged sets the callback for fullscreen state changes.
144+func (c *ContentCoordinator) SetOnFullscreenChanged(fn func(entering bool)) {
145+ c.onFullscreenChanged = fn
146+}
147+
140 // EnsureWebView acquires or reuses a WebView for the given pane.148 // EnsureWebView acquires or reuses a WebView for the given pane.
141 func (c *ContentCoordinator) EnsureWebView(ctx context.Context, paneID entity.PaneID) (*webkit.WebView, error) {149 func (c *ContentCoordinator) EnsureWebView(ctx context.Context, paneID entity.PaneID) (*webkit.WebView, error) {
142 log := logging.FromContext(ctx)150 log := logging.FromContext(ctx)
@@ -1289,6 +1297,9 @@ func (c *ContentCoordinator) setupIdleInhibitionHandlers(ctx context.Context, pa
1289 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to inhibit idle")1297 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to inhibit idle")
1290 }1298 }
1291 }1299 }
1300+ if c.onFullscreenChanged != nil {
1301+ c.onFullscreenChanged(true)
1302+ }
1292 return false // Allow fullscreen1303 return false // Allow fullscreen
1293 }1304 }
1294 1305
@@ -1298,6 +1309,9 @@ func (c *ContentCoordinator) setupIdleInhibitionHandlers(ctx context.Context, pa
1298 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to uninhibit idle")1309 log.Warn().Err(err).Str("pane_id", string(paneID)).Msg("failed to uninhibit idle")
1299 }1310 }
1300 }1311 }
1312+ if c.onFullscreenChanged != nil {
1313+ c.onFullscreenChanged(false)
1314+ }
1301 return false // Allow leaving fullscreen1315 return false // Allow leaving fullscreen
1302 }1316 }
1303 1317

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close