Keep desktop detail pane visible
This commit is contained in:
+3
-18
@@ -1312,10 +1312,10 @@ func (u *ui) primaryContent(gtx layout.Context) layout.Dimensions {
|
|||||||
case u.shouldUseLockedSinglePane():
|
case u.shouldUseLockedSinglePane():
|
||||||
return u.detailPanel(gtx)
|
return u.detailPanel(gtx)
|
||||||
case !u.shouldShowDetailPane():
|
case !u.shouldShowDetailPane():
|
||||||
if !u.usesCompactViewport() {
|
if u.usesCompactViewport() {
|
||||||
return u.desktopListOnlyContent(gtx)
|
return u.listPanel(gtx)
|
||||||
}
|
}
|
||||||
return u.listPanel(gtx)
|
return u.widePrimaryContent(gtx)
|
||||||
case u.usesCompactViewport():
|
case u.usesCompactViewport():
|
||||||
return u.compactPrimaryContent(gtx)
|
return u.compactPrimaryContent(gtx)
|
||||||
default:
|
default:
|
||||||
@@ -1371,21 +1371,6 @@ func (u *ui) widePrimaryContent(gtx layout.Context) layout.Dimensions {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *ui) desktopListOnlyContent(gtx layout.Context) layout.Dimensions {
|
|
||||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
|
||||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
|
||||||
return card(gtx, func(gtx layout.Context) layout.Dimensions {
|
|
||||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
|
||||||
layout.Rigid(u.headerActions),
|
|
||||||
layout.Rigid(u.desktopHeaderMenus),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}),
|
|
||||||
layout.Rigid(layout.Spacer{Height: unit.Dp(12)}.Layout),
|
|
||||||
layout.Flexed(1, u.listPanel),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *ui) syncDialogOverlay(gtx layout.Context) layout.Dimensions {
|
func (u *ui) syncDialogOverlay(gtx layout.Context) layout.Dimensions {
|
||||||
if !u.syncDialogOpen {
|
if !u.syncDialogOpen {
|
||||||
return layout.Dimensions{}
|
return layout.Dimensions{}
|
||||||
|
|||||||
Reference in New Issue
Block a user