Skip to content

Commit

Permalink
Optimize theme
Browse files Browse the repository at this point in the history
  • Loading branch information
qianlifeng committed Nov 9, 2023
1 parent 8ca3050 commit aead885
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions Wox.UI.Tauri/src/components/WoxQueryBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const Style = styled.div<{ theme: Theme }>`
cursor: auto;
color: ${props => props.theme.QueryBoxFontColor};
background-color: ${props => props.theme.QueryBoxBackgroundColor};
border-radius: ${props => props.theme.QueryBoxBorderRadius}px;
display: inline-block;
box-sizing: border-box;
}
Expand Down
2 changes: 1 addition & 1 deletion Wox.UI.Tauri/src/components/WoxQueryResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ const Style = styled.div<{ theme: Theme, resultCount: number }>`
left: 0;
right: 0;
top: ${props => (props.resultCount > 10 ? 10 : props.resultCount) * 50 + 60}px;
background-color: ${props => props.theme.AppBackgroundColor};
background-color: ${props => props.theme.ActionContainerBackgroundColor};
bottom: 0;
z-index: 8888;
}
Expand Down
2 changes: 2 additions & 0 deletions Wox.UI.Tauri/src/entity/Theme.typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export interface Theme {
ResultItemActiveBackgroundColor: string
QueryBoxFontColor: string
QueryBoxBackgroundColor: string
QueryBoxBorderRadius: number
ActionContainerBackgroundColor: string
ActionContainerHeaderFontColor: string
ActionItemActiveBackgroundColor: string
ActionQueryBoxFontColor: string
Expand Down
20 changes: 17 additions & 3 deletions Wox/resource/ui/themes/dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@
"ThemeAuthor": "Wox launcher",
"ThemeUrl": "http://github.com/wox-launcher/wox",
"AppBackgroundColor": "rgba(44, 48, 50, 0.7)",
"ResultContainerPadding": "0",
"ResultItemBorderRadius": "0",
"AppPaddingLeft": 10,
"AppPaddingTop": 10,
"AppPaddingRight": 10,
"AppPaddingBottom": 10,
"ResultContainerPaddingLeft": 0,
"ResultContainerPaddingTop": 10,
"ResultContainerPaddingRight": 0,
"ResultContainerPaddingBottom": 0,
"ResultItemBorderRadius": 0,
"ResultItemPaddingLeft": 0,
"ResultItemPaddingTop": 0,
"ResultItemPaddingRight": 0,
"ResultItemPaddingBottom": 0,
"ResultItemActiveBackgroundColor": "rgba(31, 118, 124, 0.8)",
"QueryBoxFontColor": "#e4e7e7",
"QueryBoxBackgroundColor": "rgba(44, 48, 50, 0.7)",
"QueryBoxBorderRadius": 0,
"ActionContainerBackgroundColor": "rgba(44, 48, 50, 0.7)",
"ActionContainerHeaderFontColor": "#e4e7e7",
"ActionItemActiveBackgroundColor": "rgba(47, 63, 73, 0.8)",
"ActionItemActiveBackgroundColor": "rgba(31, 118, 124, 0.8)",
"ActionQueryBoxFontColor": "#e4e7e7"
}
2 changes: 2 additions & 0 deletions Wox/ui/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type Theme struct {
ResultItemActiveBackgroundColor string
QueryBoxFontColor string
QueryBoxBackgroundColor string
QueryBoxBorderRadius int
ActionContainerBackgroundColor string
ActionContainerHeaderFontColor string
ActionItemActiveBackgroundColor string
ActionQueryBoxFontColor string
Expand Down

0 comments on commit aead885

Please sign in to comment.