fix(shell): set default terminal fontSize to 6px
All checks were successful
Stable Release / stable (push) Successful in 48s
All checks were successful
Stable Release / stable (push) Successful in 48s
All fallbacks were still using 12px. User confirmed 6px is the correct baseline on their display. 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
@@ -204,7 +204,7 @@ function createTerminal(container, settings = {}) {
|
||||
const term = new XTerm({
|
||||
cursorBlink: true,
|
||||
allowProposedApi: true,
|
||||
fontSize: settings.fontSize || 12,
|
||||
fontSize: settings.fontSize || 6,
|
||||
fontFamily: settings.fontFamily || "'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', monospace",
|
||||
theme,
|
||||
allowTransparency: false,
|
||||
@@ -350,7 +350,7 @@ export default function Shell({ api }) {
|
||||
const { t } = useI18n()
|
||||
const tabsRef = useRef({})
|
||||
const nextIdRef = useRef(1)
|
||||
const settingsRef = useRef({ fontSize: 10, fontFamily: "'JetBrains Mono', 'Fira Code', monospace", theme: 'system' })
|
||||
const settingsRef = useRef({ fontSize: 6, fontFamily: "'JetBrains Mono', 'Fira Code', monospace", theme: 'system' })
|
||||
const pendingCommandsRef = useRef({})
|
||||
|
||||
const [tabs, setTabs] = useState(() => {
|
||||
@@ -399,7 +399,7 @@ export default function Shell({ api }) {
|
||||
const [editingTab, setEditingTab] = useState(null)
|
||||
const [editName, setEditName] = useState('')
|
||||
const [terminalSettings, setTerminalSettings] = useState({
|
||||
fontSize: 10,
|
||||
fontSize: 6,
|
||||
fontFamily: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', monospace",
|
||||
theme: 'system',
|
||||
})
|
||||
@@ -414,7 +414,7 @@ export default function Shell({ api }) {
|
||||
useEffect(() => { settingsRef.current = terminalSettings }, [terminalSettings])
|
||||
|
||||
useEffect(() => {
|
||||
baseFontSizeRef.current = terminalSettings.fontSize || 12
|
||||
baseFontSizeRef.current = terminalSettings.fontSize || 6
|
||||
}, [terminalSettings.fontSize])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -496,7 +496,7 @@ export default function Shell({ api }) {
|
||||
api.getConfig().then(d => {
|
||||
if (d.terminal) {
|
||||
setTerminalSettings({
|
||||
fontSize: d.terminal.font_size || 10,
|
||||
fontSize: d.terminal.font_size || 6,
|
||||
fontFamily: d.terminal.font_family || "'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', monospace",
|
||||
theme: d.terminal.theme || 'system',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user