feat(layout): move the note title into the scrollable region

This commit is contained in:
Elian Doran 2025-12-09 20:09:06 +02:00
parent fe7ca210dd
commit e2b6d0c256
No known key found for this signature in database

View File

@ -75,6 +75,11 @@ export default class DesktopLayout {
const customTitleBarButtons = !hasNativeTitleBar && !isMac && !isWindows; const customTitleBarButtons = !hasNativeTitleBar && !isMac && !isWindows;
const isNewLayout = isExperimentalFeatureEnabled("new-layout"); const isNewLayout = isExperimentalFeatureEnabled("new-layout");
const titleRow = new FlexContainer("row")
.class("title-row")
.child(<NoteIconWidget />)
.child(<NoteTitleWidget />);
const rootContainer = new RootContainer(true) const rootContainer = new RootContainer(true)
.setParent(appContext) .setParent(appContext)
.class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout") .class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout")
@ -142,17 +147,14 @@ export default class DesktopLayout {
.child(<CreatePaneButton />) .child(<CreatePaneButton />)
.optChild(isNewLayout, <NoteActions />) .optChild(isNewLayout, <NoteActions />)
) )
.child(new FlexContainer("row") .optChild(!isNewLayout, titleRow)
.class("title-row")
.child(<NoteIconWidget />)
.child(<NoteTitleWidget />)
)
.optChild(!isNewLayout, <Ribbon><NoteActions /></Ribbon>) .optChild(!isNewLayout, <Ribbon><NoteActions /></Ribbon>)
.child(new WatchedFileUpdateStatusWidget()) .child(new WatchedFileUpdateStatusWidget())
.child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />) .child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />)
.child( .child(
new ScrollingContainer() new ScrollingContainer()
.filling() .filling()
.optChild(isNewLayout, titleRow)
.child(new ContentHeader() .child(new ContentHeader()
.child(<ReadOnlyNoteInfoBar />) .child(<ReadOnlyNoteInfoBar />)
.child(<SharedInfo />) .child(<SharedInfo />)