Skip to content

Commit

Permalink
[test] graph old colors - use theme colors for background and grid
Browse files Browse the repository at this point in the history
  • Loading branch information
DartVanya committed Dec 12, 2024
1 parent dafd8fc commit 3971519
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
8 changes: 4 additions & 4 deletions SystemInformer/sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,15 +1074,15 @@ VOID PhSiSetColorsGraphDrawInfo(
DrawInfo->TextBoxColor = RGB(0xe7, 0xe7, 0xe7);
break;
case 1: // Old colors
DrawInfo->BackColor = RGB(0x00, 0x00, 0x00);
DrawInfo->BackColor = PhThemeWindowForegroundColor;
DrawInfo->LineColor1 = Color1;
DrawInfo->LineBackColor1 = PhHalveColorBrightness(Color1);
DrawInfo->LineColor2 = Color2;
DrawInfo->LineBackColor2 = PhHalveColorBrightness(Color2);
DrawInfo->GridColor = RGB(0x00, 0x57, 0x00);
DrawInfo->GridColor = PhThemeWindowBackground2Color;
DrawInfo->LabelYColor = RGB(0xd0, 0xa0, 0x70);
DrawInfo->TextColor = RGB(0x00, 0xff, 0x00);
DrawInfo->TextBoxColor = RGB(0x00, 0x22, 0x00);
DrawInfo->TextColor = PhMakeColorDarker(PhThemeWindowTextColor, 7);
DrawInfo->TextBoxColor = PhThemeWindowBackgroundColor;
break;
}
}
Expand Down
33 changes: 33 additions & 0 deletions phlib/include/guisup.h
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,39 @@ PhMakeColorBrighter(
return RGB(r, g, b);
}

FORCEINLINE
COLORREF
PhMakeColorDarker(
_In_ COLORREF Color,
_In_ UCHAR Increment
)
{
UCHAR r;
UCHAR g;
UCHAR b;

r = (UCHAR)Color;
g = (UCHAR)(Color >> 8);
b = (UCHAR)(Color >> 16);

if (r - Increment > 0)
r -= Increment;
else
r = 0;

if (g - Increment > 0)
g -= Increment;
else
g = 0;

if (b - Increment > 0)
b -= Increment;
else
b = 0;

return RGB(r, g, b);
}

// Window support

typedef enum _PH_PLUGIN_WINDOW_EVENT_TYPE
Expand Down
5 changes: 1 addition & 4 deletions plugins/ExtendedTools/objmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,10 +1454,7 @@ VOID EtObjectManagerFreeListViewItems(

PhClearReference(&Context->CurrentPath);

for (ULONG i = 0; i < Context->CurrentDirectoryList->Count; i++)
{
PhDereferenceObject(Context->CurrentDirectoryList->Items[i]);
}
PhDereferenceObjects(Context->CurrentDirectoryList->Items, Context->CurrentDirectoryList->Count);

//INT index = INT_ERROR;
//while ((index = PhFindListViewItemByFlags(
Expand Down
1 change: 1 addition & 0 deletions plugins/HardwareDevices/gpuoptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ VOID FindGraphicsDevices(
PhFree(entry);
}
PhReleaseQueuedLockShared(&GraphicsDevicesListLock);
PhDereferenceObject(deviceList);

// HACK: Show all unknown devices.
PhAcquireQueuedLockShared(&GraphicsDevicesListLock);
Expand Down

0 comments on commit 3971519

Please sign in to comment.