Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style/center pane: refactor rounded corners
Adorian Dorand0b04144599b
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.cssindex ebf4d6f3cf..6e37fa1edb 100644--- a/apps/client/src/stylesheets/theme-next/shell.css+++ b/apps/client/src/stylesheets/theme-next/shell.css@@ -101,12 +101,24 @@ body.background-effects.theme-supports-background-effects #center-pane .note-spl/* #endregion */+#horizontal-main-container {+ /* The default start-start and end-start border radius for the note split.+ * Updated automatically according to the layout. */+ --note-split-top-border-radius: var(--center-pane-border-radius);+ --note-split-bottom-border-radius: var(--center-pane-border-radius);+}+/* Matches when the left pane is collapsed */#horizontal-main-container.left-pane-hidden {- --center-pane-border-radius: 0;+ --note-split-top-border-radius: 0;--tab-first-item-horiz-offset: 5px;}+/* Matches when a status bar panel is open */+body.experimental-feature-new-layout #horizontal-main-container:has(#rest-pane > .status-bar.status-bar-panel-open) {+ --note-split-bottom-border-radius: 0;+}+/* Add a border to the vertical launch bar if collapsed. */body.layout-vertical #horizontal-main-container.left-pane-hidden #launcher-pane.vertical {border-inline-end: 2px solid var(--left-pane-collapsed-border-color);@@ -1293,7 +1305,7 @@ body.layout-vertical .tab-row-widget-is-sorting .note-tab.note-tab-is-dragging .}body.layout-vertical #rest-pane > .classic-toolbar-widget {- border-start-start-radius: var(--center-pane-border-radius);+ border-start-start-radius: var(--note-split-top-border-radius);}body.layout-vertical #rest-pane > .classic-toolbar-widget {@@ -1306,7 +1318,7 @@ body.layout-horizontal #rest-pane > .classic-toolbar-widget {.classic-toolbar-widget:not(.hidden-ext) + #vertical-main-container {/* Remove the center panel border radius when the toolbar is visible */- --center-pane-border-radius: 0;+ --note-split-top-border-radius: 0;}/*@@ -1320,14 +1332,14 @@ body.layout-horizontal #rest-pane > .classic-toolbar-widget {/* The first visible note split */.vertical-layout #center-pane .note-split:not(.visible ~ .visible) {- border-start-start-radius: var(--center-pane-border-radius);+ border-start-start-radius: var(--note-split-top-border-radius);body.desktop.experimental-feature-new-layout & {- border-end-start-radius: var(--center-pane-border-radius);+ border-end-start-radius: var(--note-split-bottom-border-radius);> .scrolling-container {/* Use clip-path to force rounded bottom corner for the note content */- clip-path: inset(0px round 0 0 0 var(--center-pane-border-radius));+ clip-path: inset(0px round 0 0 0 var(--note-split-bottom-border-radius));}}}diff --git a/apps/client/src/widgets/layout/StatusBar.css b/apps/client/src/widgets/layout/StatusBar.cssindex 9d28bf2121..8da582cab0 100644--- a/apps/client/src/widgets/layout/StatusBar.css+++ b/apps/client/src/widgets/layout/StatusBar.css@@ -1,4 +1,4 @@-.component.status-bar {+.status-bar {contain: none;> .status-bar-main-row {@@ -198,6 +198,7 @@ body.experimental-feature-new-layout.mobile div.similar-notes-widget div.similar.bottom-panel-content {border-bottom: 1px solid var(--main-border-color);+ border-end-start-radius: var(--center-pane-border-radius);background: var(--bottom-panel-background-color);padding: 8px 12px;max-height: 40vh;diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsxindex d9f5572a64..53915cd0e9 100644--- a/apps/client/src/widgets/layout/StatusBar.tsx+++ b/apps/client/src/widgets/layout/StatusBar.tsx@@ -61,7 +61,7 @@ export default function StatusBar() {const isHiddenNote = note?.isHiddenCompletely();return (- <div className="status-bar">+ <div className={clsx("status-bar", {"status-bar-panel-open": !!activePane})}>{attributesContext && <AttributesPane {...attributesContext} />}{noteInfoContext && <SimilarNotesPane {...noteInfoContext} />}