Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisMountainMobile authored Mar 6, 2022
1 parent aa9c1a3 commit 27703ed
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 63 deletions.
8 changes: 4 additions & 4 deletions source/tc2ch/dll/tcdll.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,8,1,1
PRODUCTVERSION 4,8,1,1
FILEVERSION 4,9,0,1
PRODUCTVERSION 4,9,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -45,11 +45,11 @@ BEGIN
BEGIN
VALUE "Comments", "TClock DLL for Windows10 and Windows11"
VALUE "FileDescription", "DLL for TClock-Win10"
VALUE "FileVersion", "4.8.1.1"
VALUE "FileVersion", "4.9.0.1"
VALUE "InternalName", "TCDLL"
VALUE "OriginalFilename", "tcdll-win10.dll"
VALUE "ProductName", "TClock-Win10"
VALUE "ProductVersion", "4.8.1.1"
VALUE "ProductVersion", "4.9.0.1"
END
END
BLOCK "VarFileInfo"
Expand Down
78 changes: 55 additions & 23 deletions source/tc2ch/dll/tclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,29 +1336,37 @@ void ReadData()
//設定番号取得


colfore = GetMyRegLong("Color_Font", "ForeColor",
0x80000000 | COLOR_BTNTEXT);
ColorWeekdayText = colfore;

// textcol_DoWzone = ColorWeekdayText; //初期値設定は平日と同じにする。コメントアウトすると起動時は黒
colfore = GetMyRegLong("Color_Font", "ForeColor", 0x80000000 | COLOR_BTNTEXT);
if (colfore & 0x80000000) colfore = GetSysColor(colfore & 0x00ffffff);
SetMyRegLong("Color_Font", "ForeColor", colfore);

ColorWeekdayText = colfore;
colWin11Notify = colfore; //通知アイコンはメインテキストと同色

colback = GetMyRegLong("Color_Font", "BackColor", 0x80000000 | COLOR_3DFACE);
if (colback & 0x80000000) colback = GetSysColor(colback & 0x00ffffff);
SetMyRegLong("Color_Font", "BackColor", colback);

colback = GetMyRegLong("Color_Font", "BackColor",
0x80000000 | COLOR_3DFACE);
if(GetMyRegLong("Color_Font", "UseBackColor2", FALSE))
colback2 = GetMyRegLong("Color_Font", "BackColor2", colback);
else colback2 = colback;
colback2 = GetMyRegLong("Color_Font", "BackColor2", colback);
if (colback2 & 0x80000000) colback2 = GetSysColor(colback2 & 0x00ffffff);
SetMyRegLong("Color_Font", "BackColor2", colback2);

if (!GetMyRegLong("Color_Font", "UseBackColor2", FALSE))
{
fillbackcolor = GetMyRegLong("Color_Font", "UseBackColor", TRUE);
colback2 = colback;
}


fillbackcolor = GetMyRegLong("Color_Font", "UseBackColor", TRUE);
grad = GetMyRegLong("Color_Font", "GradDir", GRADIENT_FILL_RECT_H);

bClockShadow = GetMyRegLong("Color_Font", "ForeColorShadow", FALSE);
bClockBorder = GetMyRegLong("Color_Font", "ForeColorBorder", FALSE);

colShadow = GetMyRegLong("Color_Font", "ShadowColor", RGB(0, 0, 0));
if (colShadow & 0x80000000) colShadow = GetSysColor(colShadow & 0x00ffffff);
SetMyRegLong("Color_Font", "ShadowColor", colShadow);

nShadowRange = (int)(short)GetMyRegLong("Color_Font", "ClockShadowRange", 1);

bRClickMenu = GetMyRegLong("Mouse", "RightClickMenu", TRUE);
Expand Down Expand Up @@ -1392,19 +1400,19 @@ void ReadData()
dlineheight = (int)(short)GetMyRegLong("Color_Font", "LineHeight", 0);

ColorSaturdayText = (COLORREF)GetMyRegLong("Color_Font", "Saturday_TextColor", 0x00C8FFC8);
if (ColorSaturdayText > 0x00FFFFFF)ColorSaturdayText = 0x00C8FFC8;
if (ColorSaturdayText & 0x80000000) ColorSaturdayText = GetSysColor(ColorSaturdayText & 0x00ffffff);
SetMyRegLong("Color_Font", "Saturday_TextColor", ColorSaturdayText);

ColorSundayText = (COLORREF)GetMyRegLong("Color_Font", "Sunday_TextColor", 0x00C8C8FF);
if (ColorSundayText > 0x00FFFFFF)ColorSaturdayText = 0x00C8C8FF;
if (ColorSundayText & 0x80000000) ColorSundayText = GetSysColor(ColorSundayText & 0x00ffffff);
SetMyRegLong("Color_Font", "Sunday_TextColor", ColorSundayText);

ColorHolidayText = (COLORREF)GetMyRegLong("Color_Font", "Holiday_TextColor", 0x00C8C8FF);
if (ColorHolidayText > 0x00FFFFFF)ColorSaturdayText = 0x00C8C8FF;
if (ColorHolidayText & 0x80000000) ColorHolidayText = GetSysColor(ColorHolidayText & 0x00ffffff);
SetMyRegLong("Color_Font", "Holiday_TextColor", ColorHolidayText);

ColorVPNText = (COLORREF)GetMyRegLong("Color_Font", "VPN_TextColor", 0x00FFFF00);
if (ColorVPNText > 0x00FFFFFF)ColorSaturdayText = 0x00FFFF00;
if (ColorVPNText & 0x80000000) ColorVPNText = GetSysColor(ColorVPNText & 0x00ffffff);
SetMyRegLong("Color_Font", "VPN_TextColor", ColorVPNText);

bUseAllColor = GetMyRegLong("Color_Font", "UseAllColor", FALSE);
Expand Down Expand Up @@ -1604,7 +1612,6 @@ void ReadData()
ColorBarMeterVL_Mute = (COLORREF)GetMyRegLong("BarMeter", "ColorBarMeterVL_Mute", RGB(255, 0, 0));
SetMyRegLong("BarMeter", "ColorBarMeterVL_Mute", ColorBarMeterVL_Mute);


BarMeterVL_Right = (int)(short)GetMyRegLong("BarMeter", "BarMeterVL_Right", 290);
SetMyRegLong("BarMeter", "BarMeterVL_Right", BarMeterVL_Right);

Expand Down Expand Up @@ -2280,13 +2287,17 @@ void OnTimer_Win10(void)
}


if (nBlink > 0)nBlink--;
if (nBlink > 0) {
nBlink--;
bRedraw = TRUE;
}


if (((t.wMinute * 60 + t.wSecond - intOffsetChimeSec) % 3600) == 0)
{
if (b_EnableBlinkOnChime) {
nBlink = BlinksOnChime * 2;
bRedraw = TRUE;
}

if (b_EnableChime) {
Expand Down Expand Up @@ -2984,7 +2995,13 @@ static BOOL InitAnalogClockData(HWND hWnd)
nAnalogClockPos = (int)(short)GetMyRegLong("AnalogClock", "AnalogClockPos", 0);

colAClockHourHandColor = (COLORREF)GetMyRegLong("AnalogClock", "AClockHourHandColor", (LONG)RGB(255, 0, 0));
if (colAClockHourHandColor & 0x80000000) colAClockHourHandColor = GetSysColor(colAClockHourHandColor & 0x00ffffff);
SetMyRegLong("AnalogClock", "AClockHourHandColor", colAClockHourHandColor);

colAClockMinHandColor = (COLORREF)GetMyRegLong("AnalogClock", "AClockMinHandColor", (LONG)RGB(0, 0, 255));
if (colAClockMinHandColor & 0x80000000) colAClockMinHandColor = GetSysColor(colAClockMinHandColor & 0x00ffffff);
SetMyRegLong("AnalogClock", "AClockMinHandColor", colAClockMinHandColor);


if (hpenHour) {
DeleteObject(hpenHour);
Expand Down Expand Up @@ -3282,15 +3299,30 @@ COLORREF TextColorFromInfoVal(int infoval)
}
else if (infoval == 0x02) //日付
{
if (bUseDateColor)colRet = textcol_DoWzone;
if (bUseDateColor) {
colRet = textcol_DoWzone;
}
else {
colRet = ColorWeekdayText;
}
}
else if (infoval == 0x04) //曜日
{
if (bUseDowColor)colRet = textcol_DoWzone;
if (bUseDowColor) {
colRet = textcol_DoWzone;
}
else {
colRet = ColorWeekdayText;
}
}
else if (infoval == 0x08) //時刻
{
if (bUseTimeColor)colRet = textcol_DoWzone;
if (bUseTimeColor) {
colRet = textcol_DoWzone;
}
else {
colRet = ColorWeekdayText;
}
}
else
{
Expand Down Expand Up @@ -4299,7 +4331,7 @@ void FillClock()
else if (colback == colback2)
{
col = colback;
if(col & 0x80000000) col = GetSysColor(col & 0x00ffffff);
//if(col & 0x80000000) col = GetSysColor(col & 0x00ffffff);
hbr = CreateSolidBrush(col);
FillRect(hdcClock, &tempRect, hbr);
DeleteObject(hbr);
Expand All @@ -4309,9 +4341,9 @@ void FillClock()
COLORREF col2;

col = colback;
if(col & 0x80000000) col = GetSysColor(col & 0x00ffffff);
//if(col & 0x80000000) col = GetSysColor(col & 0x00ffffff);
col2 = colback2;
if(col2 & 0x80000000) col2 = GetSysColor(col2 & 0x00ffffff);
//if(col2 & 0x80000000) col2 = GetSysColor(col2 & 0x00ffffff);

GradientFillClock(col, col2, grad);
}
Expand Down
16 changes: 10 additions & 6 deletions source/tc2ch/dll/tooltip.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ static void TooltipApplySetting(void)
{
COLORREF tcolf, tcolb;
tcolf = dwTooltipFonCol; tcolb = dwTooltipBakCol;
if(tcolf & 0x80000000) tcolf = GetSysColor(tcolf & 0x00ffffff);
if(tcolb & 0x80000000) tcolb = GetSysColor(tcolb & 0x00ffffff);
//if(tcolf & 0x80000000) tcolf = GetSysColor(tcolf & 0x00ffffff);
//if(tcolb & 0x80000000) tcolb = GetSysColor(tcolb & 0x00ffffff);
colTooltipText = tcolf;
colTooltipBack = tcolb;
switch(dwTooltipTypeCur)
Expand Down Expand Up @@ -749,10 +749,14 @@ void TooltipReadData(void)
GetMyRegStr("Tooltip", "TipTitle", tiptitle, 300, "TClock-Win10 <%VerTC%>");
SetMyRegStr("Tooltip", "TipTitle", tiptitle);

dwTooltipFonCol = GetMyRegLong("Tooltip", "TipFontColor",
0x80000000 | COLOR_INFOTEXT);
dwTooltipBakCol = GetMyRegLong("Tooltip", "TipBakColor",
0x80000000 | COLOR_INFOBK);
dwTooltipFonCol = GetMyRegLong("Tooltip", "TipFontColor", 0x80000000 | COLOR_INFOTEXT);
if (dwTooltipFonCol & 0x80000000) dwTooltipFonCol = GetSysColor(dwTooltipFonCol & 0x00ffffff);
SetMyRegLong("Tooltip", "TipFontColor", dwTooltipFonCol);

dwTooltipBakCol = GetMyRegLong("Tooltip", "TipBakColor", 0x80000000 | COLOR_INFOBK);
if (dwTooltipBakCol & 0x80000000) dwTooltipBakCol = GetSysColor(dwTooltipBakCol & 0x00ffffff);
SetMyRegLong("Tooltip", "TipBakColor", dwTooltipBakCol);


colTooltipTitle = GetMyRegLong("Tooltip", "TipTitleColor", RGB(0,0,255));
SetMyRegLong("Tooltip", "TipTitleColor", colTooltipTitle);
Expand Down
6 changes: 3 additions & 3 deletions source/tc2ch/exe/pageanalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BOOL CALLBACK PageAnalogClockProc(HWND hDlg, UINT message,
OnMeasureItemColorCombo(lParam);
return TRUE;
case WM_DRAWITEM:
OnDrawItemColorCombo(lParam, 20);
OnDrawItemColorCombo(lParam, 16);
return TRUE;
case WM_COMMAND:
{
Expand All @@ -61,7 +61,7 @@ BOOL CALLBACK PageAnalogClockProc(HWND hDlg, UINT message,
break;
case IDC_CHOOSECOLMIN:
case IDC_CHOOSECOLHOUR:
OnChooseColor(hDlg, id, 20);
OnChooseColor(hDlg, id, 16);
SendPSChanged(hDlg);
break;
case IDC_ACLOCK_POS:
Expand Down Expand Up @@ -116,7 +116,7 @@ void OnInit(HWND hDlg)
char fname[MAX_PATH + 1];

// setting of "min hand" and "hour hand"
InitComboColor(hDlg, 2, combocolor, 20, TRUE);
InitComboColor(hDlg, 2, combocolor, 16, TRUE);

// if color depth is 256 or less
hdc = CreateIC("DISPLAY", NULL, NULL, NULL);
Expand Down
6 changes: 3 additions & 3 deletions source/tc2ch/exe/pagecolor.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BOOL CALLBACK PageColorProc(HWND hDlg, UINT message,
OnMeasureItemColorCombo(lParam);
return TRUE;
case WM_DRAWITEM:
OnDrawItemColorCombo(lParam, 20);
OnDrawItemColorCombo(lParam, 16);
return TRUE;
case WM_COMMAND:
{
Expand Down Expand Up @@ -104,7 +104,7 @@ BOOL CALLBACK PageColorProc(HWND hDlg, UINT message,
case IDC_CHOOSECOLBACK2:
case IDC_CHOOSECOLFORE:
case IDC_CHOOSECOLCLKSHADOW:
OnChooseColor(hDlg, id, 20);
OnChooseColor(hDlg, id, 16);
SendPSChanged(hDlg);
break;
case IDC_BOLD:
Expand Down Expand Up @@ -160,7 +160,7 @@ void OnInit(HWND hDlg)
confNo = 1;

// setting of "background" and "text"
InitComboColor(hDlg, 4, combocolor, 20, TRUE);
InitComboColor(hDlg, 4, combocolor, 16, TRUE);

// if color depth is 256 or less
hdc = CreateIC("DISPLAY", NULL, NULL, NULL);
Expand Down
6 changes: 3 additions & 3 deletions source/tc2ch/exe/pagecolor_additional.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BOOL CALLBACK PageColorAdditionalProc(HWND hDlg, UINT message,
OnMeasureItemColorCombo(lParam);
return TRUE;
case WM_DRAWITEM:
OnDrawItemColorCombo(lParam, 20);
OnDrawItemColorCombo(lParam, 16);
return TRUE;
case WM_COMMAND:
{
Expand All @@ -69,7 +69,7 @@ BOOL CALLBACK PageColorAdditionalProc(HWND hDlg, UINT message,
case IDC_CHOOSECOL_SUN:
case IDC_CHOOSECOL_HOLIDAY:
case IDC_CHOOSECOL_VPN:
OnChooseColor(hDlg, id, 20);
OnChooseColor(hDlg, id, 16);
SendPSChanged(hDlg);
break;
}
Expand Down Expand Up @@ -100,7 +100,7 @@ void OnInit(HWND hDlg)
DWORD dwVer;
int index;

InitComboColor(hDlg, 4, combocolor, 20, TRUE);
InitComboColor(hDlg, 4, combocolor, 16, TRUE);

// if color depth is 256 or less
hdc = CreateIC("DISPLAY", NULL, NULL, NULL);
Expand Down
6 changes: 3 additions & 3 deletions source/tc2ch/exe/pagetooltip.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ BOOL CALLBACK PageTooltipProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
OnMeasureItemColorCombo(lParam);
return TRUE;
case WM_DRAWITEM:
OnDrawItemColorCombo(lParam, 20);
OnDrawItemColorCombo(lParam, 16);
return TRUE;
case WM_COMMAND:
{
Expand Down Expand Up @@ -139,7 +139,7 @@ BOOL CALLBACK PageTooltipProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
case IDC_CHOOSETFONCOL:
case IDC_CHOOSETBAKCOL:
case IDC_CHOOSETTITLECOL:
OnChooseColor(hDlg, id, 20);
OnChooseColor(hDlg, id, 16);
SendPSChanged(hDlg);
break;
case IDC_SANSHOTIP:
Expand Down Expand Up @@ -194,7 +194,7 @@ void OnInit(HWND hDlg)
BOOL bTip2;

// setting of "background" and "text"
InitComboColor(hDlg, 3, combocolor, 20, TRUE);
InitComboColor(hDlg, 3, combocolor, 16, TRUE);

// if color depth is 256 or less
hdc = CreateIC("DISPLAY", NULL, NULL, NULL);
Expand Down
8 changes: 4 additions & 4 deletions source/tc2ch/exe/tclock.rc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,8,1,1
PRODUCTVERSION 4,8,1,1
FILEVERSION 4,9,0,1
PRODUCTVERSION 4,9,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -32,11 +32,11 @@ BEGIN
BEGIN
VALUE "Comments", "TClock Main for Windows10 and Windows11"
VALUE "FileDescription", "TClock-Win10"
VALUE "FileVersion", "4.8.1.1"
VALUE "FileVersion", "4.9.0.1"
VALUE "InternalName", "TClock"
VALUE "OriginalFilename", "TClock-Win10.exe"
VALUE "ProductName", "TClock-Win10"
VALUE "ProductVersion", "4.8.1.1"
VALUE "ProductVersion", "4.9.0.1"
END
END
BLOCK "VarFileInfo"
Expand Down
Loading

0 comments on commit 27703ed

Please sign in to comment.