fix: pointer cursor on clickables, 'No icon' is a real button
styles.css used cursor: var(--cursor) in 10 places and the icon modal in 2 more. Obsidian defines --cursor as 'default', so nothing in the plugin ever showed a pointer — the old 'correct cursor on hover' todo never actually worked. Use var(--cursor-link, pointer): themeable, pointer by default. cursor: grab on separators/spacers is left alone. 'No icon' was a bare accent-coloured span in the status row. It commits a value and closes, exactly like Save, so it is now a real button in the modal button container, left-aligned via margin-right: auto to read as a secondary action. Also adds the missing trailing newline to styles.css.
This commit is contained in:
+10
-10
@@ -1228,15 +1228,6 @@ class IconSuggestModal extends Modal {
|
|||||||
const statusEl = statusRow.createSpan();
|
const statusEl = statusRow.createSpan();
|
||||||
statusEl.setText('Loading\u2026');
|
statusEl.setText('Loading\u2026');
|
||||||
|
|
||||||
const clearEl = statusRow.createSpan();
|
|
||||||
clearEl.style.cursor = 'var(--cursor)';
|
|
||||||
clearEl.style.color = 'var(--text-accent)';
|
|
||||||
clearEl.setText('No icon');
|
|
||||||
clearEl.addEventListener('click', () => {
|
|
||||||
this.onSubmit('');
|
|
||||||
this.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
// ── Load icons ──
|
// ── Load icons ──
|
||||||
this.loadIcons().then(() => {
|
this.loadIcons().then(() => {
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
@@ -1279,7 +1270,7 @@ class IconSuggestModal extends Modal {
|
|||||||
tile.style.justifyContent = 'center';
|
tile.style.justifyContent = 'center';
|
||||||
tile.style.aspectRatio = '1';
|
tile.style.aspectRatio = '1';
|
||||||
tile.style.borderRadius = '6px';
|
tile.style.borderRadius = '6px';
|
||||||
tile.style.cursor = 'var(--cursor)';
|
tile.style.cursor = 'var(--cursor-link, pointer)';
|
||||||
tile.style.transition = 'background 80ms';
|
tile.style.transition = 'background 80ms';
|
||||||
tile.setAttr('title', name);
|
tile.setAttr('title', name);
|
||||||
|
|
||||||
@@ -1334,6 +1325,15 @@ class IconSuggestModal extends Modal {
|
|||||||
|
|
||||||
// ── Buttons ──
|
// ── Buttons ──
|
||||||
const btns = modal.createDiv({ cls: 'modal-button-container' });
|
const btns = modal.createDiv({ cls: 'modal-button-container' });
|
||||||
|
|
||||||
|
// Clearing the icon commits a value and closes, exactly like Save, so it
|
||||||
|
// belongs with the buttons rather than as a bare span in the status row.
|
||||||
|
const clearBtn = btns.createEl('button', { text: 'No icon', cls: 'waypoint-icon-clear' });
|
||||||
|
clearBtn.addEventListener('click', () => {
|
||||||
|
this.onSubmit('');
|
||||||
|
this.close();
|
||||||
|
});
|
||||||
|
|
||||||
const cancel = btns.createEl('button', { text: 'Cancel' });
|
const cancel = btns.createEl('button', { text: 'Cancel' });
|
||||||
cancel.addEventListener('click', () => this.close());
|
cancel.addEventListener('click', () => this.close());
|
||||||
const saveBtn = btns.createEl('button', { text: 'Save', cls: 'mod-cta' });
|
const saveBtn = btns.createEl('button', { text: 'Save', cls: 'mod-cta' });
|
||||||
|
|||||||
+17
-9
@@ -36,7 +36,7 @@
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
color: var(--text-faint);
|
color: var(--text-faint);
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
.waypoint-calendar-breadcrumb .waypoint-clickable {
|
.waypoint-calendar-breadcrumb .waypoint-clickable {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
padding: 1px 4px;
|
padding: 1px 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
.waypoint-calendar-today-group button {
|
.waypoint-calendar-today-group button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
font-size: calc(var(--font-ui-small) * 0.75);
|
font-size: calc(var(--font-ui-small) * 0.75);
|
||||||
color: var(--text-faint);
|
color: var(--text-faint);
|
||||||
font-weight: var(--font-light);
|
font-weight: var(--font-light);
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.waypoint-calendar .waypoint-day {
|
.waypoint-calendar .waypoint-day {
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
min-height: var(--wp-cal-cell-size, 32px);
|
min-height: var(--wp-cal-cell-size, 32px);
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
background: var(--background-modifier-hover);
|
background: var(--background-modifier-hover);
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
transition: color 80ms, background 80ms;
|
transition: color 80ms, background 80ms;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
color: var(--text-faint);
|
color: var(--text-faint);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
padding: 2px 8px 2px 4px;
|
padding: 2px 8px 2px 4px;
|
||||||
font-size: var(--wp-font-size, 13px);
|
font-size: var(--wp-font-size, 13px);
|
||||||
min-height: var(--wp-row-size, 26px);
|
min-height: var(--wp-row-size, 26px);
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -392,7 +392,7 @@ button.waypoint-calendar-today-btn {
|
|||||||
.waypoint-settings-tab {
|
.waypoint-settings-tab {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: var(--cursor);
|
cursor: var(--cursor-link, pointer);
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
padding: 6px 14px;
|
padding: 6px 14px;
|
||||||
border-radius: 6px 6px 0 0;
|
border-radius: 6px 6px 0 0;
|
||||||
@@ -412,3 +412,11 @@ button.waypoint-calendar-today-btn {
|
|||||||
border-bottom: 2px solid var(--text-accent);
|
border-bottom: 2px solid var(--text-accent);
|
||||||
margin-bottom: -9px;
|
margin-bottom: -9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Icon picker ── */
|
||||||
|
|
||||||
|
/* Sits left of Cancel/Save so clearing reads as a separate, secondary action. */
|
||||||
|
.waypoint-icon-clear {
|
||||||
|
margin-right: auto;
|
||||||
|
cursor: var(--cursor-link, pointer);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user