mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-09-23 03:17:29 +02:00
Add scroll font size preference and bump v1.3.5
This commit is contained in:
@@ -470,6 +470,22 @@ pub fn set_font_size(app: AppHandle, state: State<'_, AppState>, size: u32) -> R
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_scroll_to_change_font_size(
|
||||
app: AppHandle,
|
||||
state: State<'_, AppState>,
|
||||
enabled: bool,
|
||||
) -> Result<(), String> {
|
||||
let mut config = state.config.lock().map_err(|e| e.to_string())?;
|
||||
config.scroll_to_change_font_size = enabled;
|
||||
save_app_config(&config)?;
|
||||
drop(config);
|
||||
|
||||
use tauri::Emitter;
|
||||
app.emit("scroll-to-change-font-size-changed", enabled)
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_font_family(state: State<'_, AppState>, family: String) -> Result<(), String> {
|
||||
let mut config = state.config.lock().map_err(|e| e.to_string())?;
|
||||
|
||||
Reference in New Issue
Block a user