mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
chore(editor): update some widget styles (#10311)
This commit is contained in:
@@ -373,7 +373,7 @@ export class NoteSlicer extends WidgetComponent<
|
|||||||
if (!noteBlock || !this._divingLinePositions.length) return nothing;
|
if (!noteBlock || !this._divingLinePositions.length) return nothing;
|
||||||
|
|
||||||
const rect = getRectByBlockComponent(noteBlock);
|
const rect = getRectByBlockComponent(noteBlock);
|
||||||
const width = rect.width - 2 * EDGELESS_BLOCK_CHILD_PADDING;
|
const width = rect.width - 2 * EDGELESS_BLOCK_CHILD_PADDING * this._zoom;
|
||||||
const buttonPosition = this._divingLinePositions[this._activeSlicerIndex];
|
const buttonPosition = this._divingLinePositions[this._activeSlicerIndex];
|
||||||
|
|
||||||
return html`<div class="note-slicer-container">
|
return html`<div class="note-slicer-container">
|
||||||
@@ -383,7 +383,6 @@ export class NoteSlicer extends WidgetComponent<
|
|||||||
left: `${buttonPosition.x - 66 * this._zoom}px`,
|
left: `${buttonPosition.x - 66 * this._zoom}px`,
|
||||||
top: `${buttonPosition.y}px`,
|
top: `${buttonPosition.y}px`,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: `${this._zoom}`,
|
|
||||||
transform: 'translateY(-50%)',
|
transform: 'translateY(-50%)',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { scrollbarStyle } from '@blocksuite/affine-shared/styles';
|
import { scrollbarStyle } from '@blocksuite/affine-shared/styles';
|
||||||
|
import { unsafeCSSVar, unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
||||||
import { baseTheme } from '@toeverything/theme';
|
import { baseTheme } from '@toeverything/theme';
|
||||||
import { css, unsafeCSS } from 'lit';
|
import { css, unsafeCSS } from 'lit';
|
||||||
|
|
||||||
@@ -23,8 +24,8 @@ export const styles = css`
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
font-family: ${unsafeCSS(baseTheme.fontSansFamily)};
|
font-family: ${unsafeCSS(baseTheme.fontSansFamily)};
|
||||||
|
|
||||||
background: var(--affine-background-overlay-panel-color);
|
background: ${unsafeCSSVarV2('layer/background/overlayPanel')};
|
||||||
box-shadow: var(--affine-shadow-2);
|
box-shadow: ${unsafeCSSVar('overlayPanelShadow')};
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
z-index: var(--affine-z-index-popover);
|
z-index: var(--affine-z-index-popover);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@@ -61,7 +62,7 @@ export const styles = css`
|
|||||||
border: 1px solid var(--affine-border-color, #e3e2e4);
|
border: 1px solid var(--affine-border-color, #e3e2e4);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: var(--affine-icon-color);
|
color: var(--affine-icon-color);
|
||||||
background: var(--affine-background-overlay-panel-color);
|
background: ${unsafeCSSVarV2('layer/background/overlayPanel')};
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user