2025-12-17 01:51:25 +00:00
|
|
|
import { PluginSettingTab, App, Setting } from "obsidian";
|
|
|
|
|
import type TaskmapPlugin from "./main";
|
|
|
|
|
|
|
|
|
|
export class TaskmapSettingTab extends PluginSettingTab {
|
|
|
|
|
plugin: TaskmapPlugin;
|
|
|
|
|
|
|
|
|
|
constructor(app: App, plugin: TaskmapPlugin) {
|
|
|
|
|
super(app, plugin);
|
|
|
|
|
this.plugin = plugin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
display(): void {
|
2025-12-18 11:22:45 +00:00
|
|
|
const { containerEl } = this;
|
2025-12-17 01:51:25 +00:00
|
|
|
|
|
|
|
|
containerEl.empty();
|
|
|
|
|
|
|
|
|
|
new Setting(containerEl)
|
2026-02-03 12:05:45 +00:00
|
|
|
.setName("Zoom sensitivity (touchpad)")
|
2026-04-15 19:49:37 +00:00
|
|
|
.setDesc("As a percentage")
|
2025-12-18 11:22:45 +00:00
|
|
|
.addText((text) =>
|
|
|
|
|
text
|
2026-02-03 12:05:45 +00:00
|
|
|
.setPlaceholder("100")
|
|
|
|
|
.setValue(this.plugin.settings.zoomSensitivityTouchpad)
|
2025-12-18 11:22:45 +00:00
|
|
|
.onChange(async (value) => {
|
2026-02-03 12:05:45 +00:00
|
|
|
this.plugin.settings.zoomSensitivityTouchpad = value;
|
|
|
|
|
await this.plugin.saveSettings();
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
new Setting(containerEl)
|
|
|
|
|
.setName("Zoom sensitivity (mouse)")
|
2026-04-15 19:49:37 +00:00
|
|
|
.setDesc("As a percentage")
|
2026-02-03 12:05:45 +00:00
|
|
|
.addText((text) =>
|
|
|
|
|
text
|
|
|
|
|
.setPlaceholder("100")
|
|
|
|
|
.setValue(this.plugin.settings.zoomSensitivityMouse)
|
|
|
|
|
.onChange(async (value) => {
|
|
|
|
|
this.plugin.settings.zoomSensitivityMouse = value;
|
2025-12-18 11:22:45 +00:00
|
|
|
await this.plugin.saveSettings();
|
|
|
|
|
}),
|
|
|
|
|
);
|
2025-12-17 01:51:25 +00:00
|
|
|
}
|
|
|
|
|
}
|