Skip to content

Commit

Permalink
Few dark mode fixes and top bar improvements (#1137)
Browse files Browse the repository at this point in the history
* fix: Fix progress bar coloring and remove % on indicator

Fixes #1129

* fix: Improve header, action buttons and progress bar spacing

* fix: Fix caret color on sb-mini-editor
  • Loading branch information
mufeedali authored Nov 7, 2024
1 parent d9d3868 commit c52e9e7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions web/components/top_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ export function TopBar({
<div className="sb-actions">
{progressPerc !== undefined &&
(
<div className="progress-wrapper" title={`${progressPerc}%`}>
<div className="progress-wrapper" title={`Sync Progress: ${progressPerc}%`}>
<div
className="progress-bar"
style={`background: radial-gradient(closest-side, white 79%, transparent 80% 100%), conic-gradient(#282828 ${progressPerc}%, #adadad 0);`}
style={`background: radial-gradient(closest-side, var(--top-background-color) 79%, transparent 80% 100%), conic-gradient(var(--button-color) ${progressPerc}%, var(--button-background-color) 0);`}
>
{progressPerc}%
{progressPerc}
</div>
</div>
)}
Expand Down
5 changes: 4 additions & 1 deletion web/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@
}

.sb-actions button {
width: 28px;
height: 28px;
border: 0;
margin: 3px;
margin: 2px;
margin-top: 6px;
padding: 5px;
background-color: var(--action-button-background-color);
color: var(--action-button-color);
Expand Down
17 changes: 6 additions & 11 deletions web/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ body {
max-width: var(--#{"editor-width"});
margin: auto;
font-size: 28px;
padding: 10px 0;
padding: 8px 0;
display: flex;
flex-direction: row;

Expand Down Expand Up @@ -112,41 +112,36 @@ body {

.cm-line {
padding: 0;
caret-color: var(--editor-caret-color);
}
}
}
}

.sb-actions {
display: flex;
align-items: baseline;
flex: 0 0 auto;
text-align: right;
}

.progress-wrapper {
display: inline-block;
position: relative;
top: -6px;
margin-top: 4px;
padding: 4px;
background-color: var(--top-background-color);
margin-right: -2px;
}

.progress-bar {
display: flex;
justify-content: center;
align-items: center;

width: 20px;
height: 20px;
width: 24px;
height: 24px;
border-radius: 50%;
font-size: 6px;
font-size: 8px;
}

// .progress-bar::before {
// content: "66%";
// }
}

.sb-panel {
Expand Down

0 comments on commit c52e9e7

Please sign in to comment.