mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2026-11-27 06:32:42 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bfedba45d | ||
|
|
f212db7223 | ||
|
|
2cd9119ad1 | ||
|
|
75a0af8ee4 | ||
|
|
b32de61199 | ||
|
|
ece9a9d064 |
No files matched your search
@@ -270,12 +270,7 @@ export class ObsidianMenu {
|
||||
public renderButton (isMobile: boolean, appState: AppState) {
|
||||
const isFullscreen = this.view.isFullscreen();
|
||||
return (
|
||||
<div className={clsx(
|
||||
{
|
||||
"ExcalidrawObsidianMenu--mobile": isMobile,
|
||||
"ExcalidrawObsidianMenu": !isMobile,
|
||||
},
|
||||
)}>
|
||||
<>
|
||||
<label
|
||||
className={clsx(
|
||||
"ToolIcon",
|
||||
@@ -284,7 +279,7 @@ export class ObsidianMenu {
|
||||
"is-mobile": isMobile,
|
||||
},
|
||||
)}
|
||||
onClick={this.actionShowHideMenu.bind(this,isMobile,appState)}
|
||||
onClick={this.actionShowHideMenu.bind(this, isMobile, appState)}
|
||||
>
|
||||
<div className="ToolIcon__icon" aria-label={t("OBSIDIAN_TOOLS_PANEL")}>
|
||||
{ICONS.obsidian}
|
||||
@@ -318,9 +313,9 @@ export class ObsidianMenu {
|
||||
{isFullscreen ? ICONS.exitFullScreen : ICONS.gotoFullScreen}
|
||||
</div>
|
||||
</label>
|
||||
{this.renderCustomPens(isMobile,appState)}
|
||||
{this.renderPinnedScriptButtons(isMobile,appState)}
|
||||
</div>
|
||||
{this.renderCustomPens(isMobile, appState)}
|
||||
{this.renderPinnedScriptButtons(isMobile, appState)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
+43
-54
@@ -188,7 +188,7 @@ li[data-testid] {
|
||||
}
|
||||
|
||||
.excalidraw-dirty {
|
||||
color: red;
|
||||
color: var(--text-error);
|
||||
}
|
||||
|
||||
.workspace-leaf-content .excalidraw-view {
|
||||
@@ -321,6 +321,7 @@ textarea.excalidraw-wysiwyg {
|
||||
--default-icon-size: 1rem !important;
|
||||
--lg-button-size: 1.8rem !important;
|
||||
--lg-icon-size: 1rem !important;
|
||||
--editor-container-padding: var(--size-4-2);
|
||||
}
|
||||
|
||||
.excalidraw .tray-zoom {
|
||||
@@ -330,7 +331,7 @@ textarea.excalidraw-wysiwyg {
|
||||
padding-top: 0.05rem;
|
||||
}
|
||||
|
||||
.excalidraw-container.theme--dark {
|
||||
.excalidraw-container.theme--dark { /* unused */
|
||||
background-color: #121212;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -345,10 +346,6 @@ textarea.excalidraw-wysiwyg {
|
||||
max-height: 10rem;
|
||||
}
|
||||
|
||||
.excalidraw .FixedSideContainer_side_top {
|
||||
top: 0.3rem;
|
||||
}
|
||||
|
||||
.excalidraw .ToolIcon__keybinding {
|
||||
font-size: 0.45rem !important;
|
||||
}
|
||||
@@ -363,13 +360,6 @@ label.color-input-container > input {
|
||||
max-width: 5rem;
|
||||
}
|
||||
|
||||
.excalidraw .FixedSideContainer_side_top {
|
||||
left: 10px !important;
|
||||
top: 10px !important;
|
||||
right: 10px;
|
||||
bottom: 10px !important;
|
||||
}
|
||||
|
||||
.excalidraw-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -394,10 +384,6 @@ label.color-input-container > input {
|
||||
max-width: 13rem;
|
||||
}
|
||||
|
||||
.excalidraw button {
|
||||
width: initial;
|
||||
}
|
||||
|
||||
.excalidraw input[type="color"] {
|
||||
width: 1.65rem;
|
||||
height: 1.65rem;
|
||||
@@ -431,6 +417,26 @@ div.excalidraw-draginfo {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
/* In Obsidian-Excalidraw, the Sidebar-Trigger is sometimes in a Container/
|
||||
Island, so it shall be styled like any other of its .ToolIcon siblings */
|
||||
.excalidraw :where(.mobile-misc-tools-container, .tray-misc-tools-container) .sidebar-trigger {
|
||||
background-color: unset;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
/* this appears to me as the least impactful way of undoing the upstream mess */
|
||||
--lg-button-size: var(--button-height, var(--default-button-size));
|
||||
|
||||
&:hover {
|
||||
background-color: var(--button-hover-bg);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--button-hover-bg);
|
||||
box-shadow: none;
|
||||
border: 1px solid var(--button-active-border);
|
||||
}
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel-container {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -445,8 +451,8 @@ div.excalidraw-draginfo {
|
||||
.excalidraw-sidepanel__controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.35rem 0.5rem;
|
||||
gap: var(--size-4-1);
|
||||
padding: var(--size-4-2) var(--size-4-2);
|
||||
border-bottom: 1px solid var(--divider-color, var(--background-modifier-border));
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
@@ -455,28 +461,6 @@ div.excalidraw-draginfo {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel__close-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2.6rem;
|
||||
border: 1px solid var(--divider-color, var(--background-modifier-border));
|
||||
border-radius: 0.55rem;
|
||||
background: var(--background-primary);
|
||||
color: var(--text-normal);
|
||||
padding: 0 !important;
|
||||
transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel__close-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel__close-button:hover:not(:disabled) {
|
||||
background: var(--background-modifier-hover);
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel__empty {
|
||||
padding: 0.75rem;
|
||||
color: var(--text-muted);
|
||||
@@ -516,7 +500,7 @@ div.excalidraw-draginfo {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.excalidraw-sidepanel-tab__button {
|
||||
.excalidraw-sidepanel-tab__button { /* probably unused */
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
@@ -1062,20 +1046,23 @@ textarea.excalidraw-wysiwyg, .excalidraw input {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.excalidraw .undo-redo-buttons button {
|
||||
width: 3em;
|
||||
}
|
||||
.excalidraw--tray .App-bottom-bar > .Island > .App-toolbar > .App-toolbar-content {
|
||||
/* This will render the undo/redo buttons as if they weren't
|
||||
in a separate container, but simply part of the row */
|
||||
> :not([class]) {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.ExcalidrawObsidianMenu--mobile label.ToolIcon {
|
||||
margin-left: 4px;
|
||||
> .ToolIcon__icon:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.excalidraw .excalidraw-ui-top-right.library-and-pen,
|
||||
.ExcalidrawObsidianMenu--mobile {
|
||||
display: flex;
|
||||
.excalidraw.excalidraw--mobile .excalidraw-ui-top-right {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 4px;
|
||||
gap: var(--size-4-1);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -1084,14 +1071,16 @@ textarea.excalidraw-wysiwyg, .excalidraw input {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.ExcalidrawObsidianMenu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.excalidraw :is(.mobile-misc-tools-container, .tray-misc-tools-container) {
|
||||
margin-right: unset;
|
||||
|
||||
&.layer-ui__wrapper__top-right--compact {
|
||||
gap: 0; /* there shouldn't be a larger gap in a "compact" mode */
|
||||
}
|
||||
}
|
||||
|
||||
.excalidraw .FixedSideContainer_side_top {
|
||||
padding-top: 0 !important;
|
||||
|
||||
}
|
||||
|
||||
.excalidraw .ToolIcon.ToolIcon__penMode {
|
||||
|
||||
Reference in new issue
Block a user