mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: round font size multiplier to avoid floating point precision artifacts
This commit is contained in:
parent
aecec67f22
commit
007629a050
1 changed files with 2 additions and 2 deletions
|
|
@ -203,7 +203,7 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
|
|||
}
|
||||
|
||||
const currentMultiplier = visibleProvider.contextProxy.getValue("chatFontSizeMultiplier") ?? 1
|
||||
const newMultiplier = Math.min(2, currentMultiplier + 0.1)
|
||||
const newMultiplier = Math.min(2, Math.round((currentMultiplier + 0.1) * 10) / 10)
|
||||
await visibleProvider.contextProxy.setValue("chatFontSizeMultiplier", newMultiplier)
|
||||
await visibleProvider.postStateToWebview()
|
||||
},
|
||||
|
|
@ -215,7 +215,7 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
|
|||
}
|
||||
|
||||
const currentMultiplier = visibleProvider.contextProxy.getValue("chatFontSizeMultiplier") ?? 1
|
||||
const newMultiplier = Math.max(0.5, currentMultiplier - 0.1)
|
||||
const newMultiplier = Math.max(0.5, Math.round((currentMultiplier - 0.1) * 10) / 10)
|
||||
await visibleProvider.contextProxy.setValue("chatFontSizeMultiplier", newMultiplier)
|
||||
await visibleProvider.postStateToWebview()
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue