Skip to content

Commit 05abaeb

Browse files
committed
feat: Add interactive zoom controls to status bar and fix background colors
Status Bar Improvements: - Added clickable zoom in/out buttons with icons - Zoom percentage now clickable to reset (Ctrl+0) - Better visual separation with borders - Tooltips showing keyboard shortcuts - Removed redundant zoom icon, replaced with interactive controls Background Color Fixes: - Changed main content background from zinc-900 to zinc-950 for true dark - Applied zinc-950 to html, body, and #root for consistent dark theme - Removed any blue tint from preview area - Ensures pure dark background throughout the app
1 parent 9937fda commit 05abaeb

3 files changed

Lines changed: 41 additions & 6 deletions

File tree

frontend/src/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,9 @@ export default function App() {
577577
zoom={zoom}
578578
isModified={activeTab?.isModified || isModified}
579579
viewMode={viewMode}
580+
onZoomIn={handleZoomIn}
581+
onZoomOut={handleZoomOut}
582+
onZoomReset={handleZoomReset}
580583
/>
581584

582585
<SettingsModal isOpen={settingsOpen} onClose={() => setSettingsOpen(false)} />

frontend/src/components/StatusBar/StatusBar.tsx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FileText, Hash, Type, AlignLeft, Clock, ZoomIn, Eye, Code, Columns } from 'lucide-react';
1+
import { FileText, Hash, Type, AlignLeft, Clock, ZoomIn, ZoomOut, Eye, Code, Columns } from 'lucide-react';
22
import type { ViewMode } from '../Toolbar/ViewModeToggle';
33

44
interface StatusBarProps {
@@ -10,6 +10,9 @@ interface StatusBarProps {
1010
zoom: number;
1111
isModified: boolean;
1212
viewMode?: ViewMode;
13+
onZoomIn?: () => void;
14+
onZoomOut?: () => void;
15+
onZoomReset?: () => void;
1316
}
1417

1518
export function StatusBar({
@@ -21,6 +24,9 @@ export function StatusBar({
2124
zoom,
2225
isModified,
2326
viewMode = 'preview',
27+
onZoomIn,
28+
onZoomOut,
29+
onZoomReset,
2430
}: StatusBarProps) {
2531
const viewModeIcons = {
2632
preview: <Eye className="w-3 h-3" />,
@@ -71,12 +77,32 @@ export function StatusBar({
7177
<span>{readingTime} min</span>
7278
</div>
7379

74-
<div className="flex items-center gap-1" title="Zoom level">
75-
<ZoomIn className="w-3 h-3" />
76-
<span>{zoom}%</span>
80+
{/* Zoom Controls */}
81+
<div className="flex items-center gap-1 border-l border-zinc-800 pl-3">
82+
<button
83+
onClick={onZoomOut}
84+
className="p-0.5 hover:bg-zinc-800 rounded transition-colors"
85+
title="Zoom Out (Ctrl+-)"
86+
>
87+
<ZoomOut className="w-3 h-3" />
88+
</button>
89+
<button
90+
onClick={onZoomReset}
91+
className="px-1.5 py-0.5 hover:bg-zinc-800 rounded transition-colors min-w-[40px] text-center"
92+
title="Reset Zoom (Ctrl+0)"
93+
>
94+
{zoom}%
95+
</button>
96+
<button
97+
onClick={onZoomIn}
98+
className="p-0.5 hover:bg-zinc-800 rounded transition-colors"
99+
title="Zoom In (Ctrl++)"
100+
>
101+
<ZoomIn className="w-3 h-3" />
102+
</button>
77103
</div>
78104

79-
<div className="flex items-center gap-1.5">
105+
<div className="flex items-center gap-1.5 border-l border-zinc-800 pl-3">
80106
<span
81107
className={`w-1.5 h-1.5 rounded-full ${
82108
isModified ? 'bg-amber-500' : 'bg-emerald-500'

frontend/src/index.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
font-family: 'Inter', system-ui, sans-serif;
1111
-webkit-font-smoothing: antialiased;
1212
-moz-osx-font-smoothing: grayscale;
13+
@apply bg-zinc-950;
1314
}
1415

1516
body {
1617
overflow: hidden;
18+
@apply bg-zinc-950;
19+
}
20+
21+
#root {
22+
@apply bg-zinc-950;
1723
}
1824

1925
.dark body,
@@ -138,7 +144,7 @@
138144
}
139145

140146
.main-content {
141-
@apply bg-zinc-900;
147+
@apply bg-zinc-950;
142148
}
143149

144150
:root:not(.dark) .main-content {

0 commit comments

Comments
 (0)