-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for accent color saturation level #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
WinExperiments
wants to merge
21
commits into
krlvm:master
Choose a base branch
from
WinExperiments:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ccd42f4
Add support for accent color saturation level
WinExperiments 7168bd4
Experimental accent color brightness support
WinExperiments 1347ad9
Minor fix
WinExperiments f03642a
Another minor fix
WinExperiments 81a530b
Removed some testing code
WinExperiments f622a09
Use std::set to track already processed bitmaps
krlvm 2be39e9
Restore Menu & Progress Bar settings effect
krlvm ffbce0d
Remove unused iostream inclusion
krlvm 5e32a09
Store current accent HSL values as POD
krlvm ea36b5c
Cleanup
krlvm a75d29a
Move double-processing check to StyleModifier
krlvm 000ec89
Full HSL support
WinExperiments e80b6fd
Full HSL support
WinExperiments 4fb1393
Windows 11-inspired hue enhancements
WinExperiments cf76c08
Improved accuracy
WinExperiments 886ba88
Fixed theme change bug (only when built as debug)
WinExperiments 980b506
Some adjustments
WinExperiments ae5a8d6
Restore progress bar registry option
WinExperiments 87d5173
Fix Release builds configuration
krlvm 3c5f69c
Fixed system colors colorization on DPI change
WinExperiments d1e179b
Fixed accent color brightness bug after theme change (tested on 22621…
WinExperiments File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,50 @@ | ||
| #include "BitmapHelper.h" | ||
|
|
||
| vector <HBITMAP> hBitmapList; | ||
|
krlvm marked this conversation as resolved.
Outdated
|
||
|
|
||
| bool IterateBitmap(HBITMAP hbm, BitmapPixelHandler handler) | ||
| { | ||
| BITMAP bm; | ||
| GetObject(hbm, sizeof(bm), &bm); | ||
|
|
||
| if (!hbm || bm.bmBitsPixel != 32) | ||
| { | ||
| return false; | ||
| } | ||
| if (count(hBitmapList.begin(), hBitmapList.end(), hbm) < 1) { | ||
|
krlvm marked this conversation as resolved.
Outdated
|
||
| hBitmapList.push_back(hbm); | ||
| BITMAP bm; | ||
| GetObject(hbm, sizeof(bm), &bm); | ||
|
|
||
| BYTE* pBits = new BYTE[bm.bmWidth * bm.bmHeight * 4]; | ||
| GetBitmapBits(hbm, bm.bmWidth * bm.bmHeight * 4, pBits); | ||
| if (!hbm || bm.bmBitsPixel != 32) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| BYTE* pPixel; | ||
| int x, y; | ||
| int r, g, b, a; | ||
| BYTE* pBits = new BYTE[bm.bmWidth * bm.bmHeight * 4]; | ||
| GetBitmapBits(hbm, bm.bmWidth * bm.bmHeight * 4, pBits); | ||
|
|
||
| for (y = 0; y < bm.bmHeight; y++) | ||
| { | ||
| pPixel = pBits + bm.bmWidth * 4 * y; | ||
| BYTE* pPixel; | ||
| int x, y; | ||
| int r, g, b, a; | ||
|
|
||
| for (x = 0; x < bm.bmWidth; x++) | ||
| for (y = 0; y < bm.bmHeight; y++) | ||
| { | ||
| r = pPixel[2] & 0xFFFFFF; | ||
| g = pPixel[1] & 0xFFFFFF; | ||
| b = pPixel[0] & 0xFFFFFF; | ||
| a = pPixel[3] & 0xFFFFFF; | ||
| pPixel = pBits + bm.bmWidth * 4 * y; | ||
|
|
||
| handler(r, g, b, a); | ||
| for (x = 0; x < bm.bmWidth; x++) | ||
| { | ||
| r = pPixel[2] & 0xFFFFFF; | ||
| g = pPixel[1] & 0xFFFFFF; | ||
| b = pPixel[0] & 0xFFFFFF; | ||
| a = pPixel[3] & 0xFFFFFF; | ||
|
|
||
| pPixel[2] = r; | ||
| pPixel[1] = g; | ||
| pPixel[0] = b; | ||
| pPixel[3] = a; | ||
| handler(r, g, b, a); | ||
|
|
||
| pPixel += 4; | ||
| } | ||
| } | ||
| pPixel[2] = r; | ||
| pPixel[1] = g; | ||
| pPixel[0] = b; | ||
| pPixel[3] = a; | ||
|
|
||
| SetBitmapBits(hbm, bm.bmWidth * bm.bmHeight * 4, pBits); | ||
| pPixel += 4; | ||
| } | ||
| } | ||
|
|
||
| delete[] pBits; | ||
| SetBitmapBits(hbm, bm.bmWidth * bm.bmHeight * 4, pBits); | ||
| delete[] pBits; | ||
| } | ||
| return true; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.