Skip to content

Commit

Permalink
v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Jul 29, 2024
1 parent 291cf84 commit 6dd1322
Show file tree
Hide file tree
Showing 19 changed files with 226 additions and 231 deletions.
44 changes: 26 additions & 18 deletions src/vscode-windhawk-ui/apps/vscode-windhawk-ui/src/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ mark {
content: '';
}
.anticon {
display: inline-block;
display: inline-flex;
align-items: center;
color: inherit;
font-style: normal;
line-height: 0;
Expand Down Expand Up @@ -5775,7 +5776,7 @@ a.ant-btn-sm {
margin-left: 0;
}
.ant-picker-status-error.ant-picker,
.ant-picker-status-error.ant-picker:not([disabled]):hover {
.ant-picker-status-error.ant-picker:not(.ant-picker-disabled):hover {
background-color: transparent;
border-color: #a61d24;
}
Expand All @@ -5790,7 +5791,7 @@ a.ant-btn-sm {
background: #b33b3d;
}
.ant-picker-status-warning.ant-picker,
.ant-picker-status-warning.ant-picker:not([disabled]):hover {
.ant-picker-status-warning.ant-picker:not(.ant-picker-disabled):hover {
background-color: transparent;
border-color: #d89614;
}
Expand Down Expand Up @@ -6149,7 +6150,6 @@ textarea.ant-picker-input > input {
.ant-picker-range-arrow {
position: absolute;
z-index: 1;
display: none;
width: 11.3137085px;
height: 11.3137085px;
margin-left: 16.5px;
Expand Down Expand Up @@ -14038,6 +14038,7 @@ textarea.ant-input-affix-wrapper {
padding: 0;
}
.ant-input-affix-wrapper::before {
display: inline-block;
width: 0;
visibility: hidden;
content: '\a0';
Expand Down Expand Up @@ -14472,9 +14473,8 @@ textarea.ant-input {
vertical-align: top;
border-radius: 0;
}
.ant-input-group.ant-input-group-compact > .ant-input-affix-wrapper {
display: inline-flex;
}
.ant-input-group.ant-input-group-compact > .ant-input-affix-wrapper,
.ant-input-group.ant-input-group-compact > .ant-input-number-affix-wrapper,
.ant-input-group.ant-input-group-compact > .ant-picker-range {
display: inline-flex;
}
Expand Down Expand Up @@ -14950,6 +14950,7 @@ textarea.ant-input-number-affix-wrapper {
padding: 0;
}
.ant-input-number-affix-wrapper::before {
display: inline-block;
width: 0;
visibility: hidden;
content: '\a0';
Expand Down Expand Up @@ -15348,9 +15349,8 @@ textarea.ant-input-number {
vertical-align: top;
border-radius: 0;
}
.ant-input-number-group.ant-input-number-group-compact > .ant-input-number-affix-wrapper {
display: inline-flex;
}
.ant-input-number-group.ant-input-number-group-compact > .ant-input-number-affix-wrapper,
.ant-input-number-group.ant-input-number-group-compact > .ant-input-number-number-affix-wrapper,
.ant-input-number-group.ant-input-number-group-compact > .ant-picker-range {
display: inline-flex;
}
Expand Down Expand Up @@ -15508,7 +15508,8 @@ textarea.ant-input-number {
}
.ant-input-number-handler-up-inner,
.ant-input-number-handler-down-inner {
display: inline-block;
display: inline-flex;
align-items: center;
color: inherit;
font-style: normal;
line-height: 0;
Expand Down Expand Up @@ -18880,6 +18881,7 @@ textarea.ant-pagination-options-quick-jumper input {
top: 0;
left: 0;
z-index: 1030;
max-width: 100vw;
font-weight: normal;
white-space: normal;
text-align: left;
Expand Down Expand Up @@ -18941,6 +18943,8 @@ textarea.ant-pagination-options-quick-jumper input {
border-bottom: 1px solid #303030;
}
.ant-popover-inner-content {
width: max-content;
max-width: 100%;
padding: 12px 16px;
color: rgba(255, 255, 255, 0.85);
}
Expand Down Expand Up @@ -20012,7 +20016,7 @@ span.ant-radio + * {
.ant-select-single .ant-select-selector .ant-select-selection-placeholder {
padding: 0;
line-height: 30px;
transition: all 0.3s;
transition: all 0.3s, visibility 0s;
}
.ant-select-single .ant-select-selector .ant-select-selection-item {
position: relative;
Expand Down Expand Up @@ -20140,6 +20144,7 @@ span.ant-radio + * {
width: 0;
margin: 2px 0;
line-height: 24px;
visibility: hidden;
content: '\a0';
}
.ant-select-multiple.ant-select-show-arrow .ant-select-selector,
Expand Down Expand Up @@ -20188,7 +20193,8 @@ span.ant-radio + * {
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: inline-block;
display: inline-flex;
align-items: center;
color: rgba(255, 255, 255, 0.45);
font-weight: bold;
font-size: 10px;
Expand Down Expand Up @@ -20286,10 +20292,6 @@ span.ant-radio + * {
.ant-select-multiple.ant-select-sm .ant-select-selection-search {
margin-inline-start: 3px;
}
.ant-select-multiple.ant-select-lg .ant-select-selection-item {
height: 32px;
line-height: 32px;
}
.ant-select-disabled .ant-select-selection-item-remove {
display: none;
}
Expand Down Expand Up @@ -20428,7 +20430,7 @@ span.ant-radio + * {
}
}
.ant-select-arrow {
display: inline-block;
display: inline-flex;
color: inherit;
font-style: normal;
line-height: 0;
Expand Down Expand Up @@ -21247,6 +21249,7 @@ span.ant-radio + * {
position: absolute;
display: none;
color: #177ddc;
font-size: 0;
text-align: center;
vertical-align: middle;
opacity: 0;
Expand Down Expand Up @@ -21281,6 +21284,7 @@ span.ant-radio + * {
top: 50%;
width: 100%;
padding-top: 5px;
font-size: 14px;
text-shadow: 0 1px 2px #141414;
}
.ant-spin-nested-loading > div > .ant-spin.ant-spin-show-text .ant-spin-dot {
Expand Down Expand Up @@ -26874,6 +26878,10 @@ body.windhawk-no-pointer-events .windhawk-popup-content-no-select {
color: #fff;
background-color: #177ddc;
}
.rc-virtual-list-scrollbar-thumb {
border-radius: 0 !important;
background: rgba(121, 121, 121, 0.4) !important;
}
.ant-dropdown-menu-item-active:not(.ant-dropdown-menu-item-disabled) {
color: #fff;
background-color: #1f1f1f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ body.windhawk-no-pointer-events {
}
}

.rc-virtual-list-scrollbar-thumb {
border-radius: 0 !important;
background: rgba(121, 121, 121, 0.4) !important;
}

// An ugly patch providing dark theme for dropdown menu elements.
.@{dropdown-prefix-cls} {
&-menu {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const ReactMarkdownWithStyle = styled(ReactMarkdown)`
// Word-wrap long lines.
overflow-wrap: break-word;
// Table style.
// https://github.com/micromark/micromark-extension-gfm-table#css
table {
border-spacing: 0;
border-collapse: collapse;
Expand All @@ -19,27 +21,10 @@ const ReactMarkdownWithStyle = styled(ReactMarkdown)`
overflow: auto;
}
tr {
background-color: var(--color-canvas-default);
border-top: 1px solid var(--color-border-muted);
}
tr:nth-child(2n) {
background-color: var(--color-canvas-subtle);
}
td,
th {
padding: 6px 13px;
border: 1px solid var(--color-border-default);
}
th {
font-weight: 600;
}
table img {
background-color: transparent;
border: 1px solid #434343;
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,39 @@ export const mockInstalledModSourceData = !useMockData
: {
source: '// Mock local source...\n',
metadata: mockModMetadata,
readme: '# Mock readme...\n',
readme: `# Mock readme...
| Month | Savings |
| -------- | ------- |
| January | $250 |
| February | $80 |
| March | $420 |
More text...`,
initialSettings: [
{
key: 'mock-setting',
value: 'mock-setting-value',
name: 'Mock Setting Name',
description: 'Mock setting description',
},
{
key: 'mock-setting-dropdown',
value: 'a',
name: 'Mock Setting Dropdown Name',
description: 'Mock setting dropdown description',
options: [
{ a: 'a option' },
{ b: 'b option' },
{ c: 'c option' },
{ d: 'd option' },
{ e: 'e option' },
{ f: 'f option' },
{ g: 'g option' },
{ h: 'h option' },
{ i: 'i option' },
],
},
{
key: 'mock-setting-array',
value: ['a', 'b', 'c'],
Expand Down Expand Up @@ -186,6 +211,7 @@ export const mockModSettings = !useMockData
? null
: {
'mock-setting': 'mock-setting-value',
'mock-setting-dropdown': 'mock-setting-value',
'mock-setting-array[0]': 'a',
'mock-setting-array[1]': 'b',
'mock-setting-array[2]': 'c',
Expand Down
20 changes: 0 additions & 20 deletions src/vscode-windhawk-ui/apps/vscode-windhawk-ui/src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,3 @@ body {
them, we aren't using them anyway */
overflow: hidden;
}

/* https://github.com/micromark/micromark-extension-gfm-table#css */

/* Light theme. */
:root {
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210, 18%, 87%, 1);
}

/* Dark theme. */
@media (prefers-color-scheme: dark) {
:root {
--color-canvas-default: #141414;
--color-canvas-subtle: #141414;
--color-border-default: #303030;
--color-border-muted: #21262d;
}
}
4 changes: 2 additions & 2 deletions src/vscode-windhawk-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vscode-windhawk-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-windhawk-ui-nx",
"version": "1.5.0",
"version": "1.5.1",
"scripts": {
"start": "nx serve",
"watch": "nx build --configuration=development --watch",
Expand Down
4 changes: 2 additions & 2 deletions src/vscode-windhawk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vscode-windhawk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "windhawk",
"displayName": "Windhawk",
"description": "Part of the Windhawk Windows customization tool",
"version": "1.5.0",
"version": "1.5.1",
"icon": "assets/main-icon.png",
"publisher": "m417z",
"engines": {
Expand Down
21 changes: 21 additions & 0 deletions src/windhawk/app/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,27 @@ std::vector<std::wstring_view> SplitStringToViews(std::wstring_view s,
return std::vector<std::wstring_view>(view.begin(), view.end());
}

// https://stackoverflow.com/a/29752943
std::wstring ReplaceAll(std::wstring_view source,
std::wstring_view from,
std::wstring_view to) {
std::wstring newString;

size_t lastPos = 0;
size_t findPos;

while ((findPos = source.find(from, lastPos)) != source.npos) {
newString.append(source, lastPos, findPos - lastPos);
newString += to;
lastPos = findPos + from.length();
}

// Care for the rest after last occurrence.
newString += source.substr(lastPos);

return newString;
}

UINT GetDpiForWindowWithFallback(HWND hWnd) {
using GetDpiForWindow_t = UINT(WINAPI*)(HWND hwnd);
static GetDpiForWindow_t pGetDpiForWindow = []() {
Expand Down
3 changes: 3 additions & 0 deletions src/windhawk/app/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ PCWSTR LoadStrFromRsrc(UINT uStrId);
std::vector<std::wstring> SplitString(std::wstring_view s, WCHAR delim);
std::vector<std::wstring_view> SplitStringToViews(std::wstring_view s,
WCHAR delim);
std::wstring ReplaceAll(std::wstring_view source,
std::wstring_view from,
std::wstring_view to);
UINT GetDpiForWindowWithFallback(HWND hWnd);
int GetSystemMetricsForDpiWithFallback(int nIndex, UINT dpi);
int GetSystemMetricsForWindow(HWND hWnd, int nIndex);
Expand Down
Loading

0 comments on commit 6dd1322

Please sign in to comment.